On 31 Jan 2002 at 8:41, Bruce BrackBill 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.  Maybe an option to ignore the
> content length of certain file types ( say text/html )
> would be an option for upcomming releases of wget.

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.

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

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

Perhaps the manual ought to mention the undesirability of using
--ignore-length with persistent connections.

Reply via email to