On Thu, 31 Jan 2002, Ian Abbott wrote:

> > The problem is, that my web pages are served up by php and the content
> > lengh is not defined.  So as the manual states I use --ignore-length.
> > But when wget retrieves an image it slows right down, possibly because it
> > is ignoring the content-length.
>
> The problem is that wget uses persistent connections by default if the
> server supports them. As you are using --ignore-length, wget must wait for
> more data will arrive while the connection is open. The persistent
> connection is closed by the server after a timeout - as far as it is
> concerned, it has already completed the request and is waiting for a new
> request to re-use the same connection. This timeout is what is causing the
> delays you are seeing.

If that is what wget does, then yes, it is obstructed by the --ignore-length
option.

The "proper" action (IMHO) would be to use a true HTTP/1.1 request and thus
most likely receive a chunked transfer-encoded data stream back, which
doesn't need a content-length header for the client to figure out when its
complete.

> You can tell wget not to allow persistent connections using the
> --no-http-keep-alive option, which should speed things up in your case.

That is not nice, and goes against recommendations in recent HTTP RFCs.

> By the way, have you tried it without the --ignore-length option to see if
> it works?

Surely it wouldn't be much difference, as the header won't be included in the
first place.

You may count this mail as advocating for HTTP 1.1 support, yes! ;-)

-- 
      Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol

Reply via email to