On Tue, 11 Nov 2003, Hrvoje Niksic wrote: > I think the difference is that Wget closes the connection when it decides > not to read the request body. For example, it closes on redirections > because it (intentionally) ignores the body.
Another approach could be to read and just ignore the body of redirect pages. You'd gain a close/connect but lose the transfer time. > With the HEAD method you never know when you'll stumble upon a CGI that > doesn't understand it and that will send the body anyway. But maybe it > would actually be a better idea to read (and discard) the body than to close > the connection and reopen it. That approach is just as hard, only depending on different things to work correctly. Since we're talking about silly servers, they could just as well return a body to the HEAD request, and the response is said to be persistant and the Content-Length: is set. The size of the Content-Length in a HEAD request is the size of the body that would be returned if GET is request so you'd have no idea how much data to read Been there. Seen it happen. There's just no good way to deal with HEAD requests that sends back a body. I mean besides yelling at the author of the server side. -- -=- Daniel Stenberg -=- http://daniel.haxx.se -=- ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol