Stefan Eissing <[EMAIL PROTECTED]> writes:

> Please excuse if this bug has already been reported:
>
> In wget 1.8.1 (OS X) and 1.8.2 (cygwin) the handling of resources
> with content-length 0 is wrong. wget tries to read the empty content
> and hangs until the socket read timeout fires. (I set the timeout to
> different values and it exactly matches the termination of the GET).
>
> Of course this is only noticable with HTTP/1.1 server which leave the
> connection open and do not apply transfer-encding: chunked for empty
> response bodies.

I've now examined the source code, and I believe Wget handles this
case correctly: if keep-alive is in use, it reads only as much data as
specified by Content-Length, attempting no read if content-length is
0.

The one case I can see might go wrong is that a server leaves a
connection hanging without having told Wget it was about to do so.
Then Wget will, being a HTTP/1.0 client, try to read all data from the
socket regardless of Content-Length.

Do you have a URL which you use to repeat this?

Reply via email to