Menu

#6 Use GET instead of HEAD for external links

open
nobody
None
5
2005-07-29
2005-07-29
No

The idea behind doing this is that there are servers
out there that don't understand the HEAD command very
well. Using GET will make things more robust in
general. Some notes:

Gisle just sets the $ua->max_size(1) which only
retrieves a single byte from a request.

Randal Schwartz recommends doing a GET after a HEAD
fails. This keeps the HEAD semantics but if more
foolproof for pesky servers not implementing HEAD right.

I'd probably want to implement both of these, with the
exception of FTP links which probably always should use
GET to avoid downloading the whole file on a HEAD
request (see other RFE by Brian).

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.