Re: [htdig3-dev] size of dynamic pages

Subject: Re: [htdig3-dev] size of dynamic pages
From: Gabriele Bartolini (
Date: Tue Feb 08 2000 - 00:04:39 PST

>Actually, it was the opposite problem, when going from 3.1.0b4 to
>the final 3.1.0 release. Older versions didn't even recognise the
>Content-Length header, and so with some servers htdig didn't handle the
>end of the input stream correctly because it was trying to read more
>than was available. It also reported the file size as max_doc_size if
>this was smaller than the content-length.
>The new code obviously assumes the Content-Length header will always be
>given - a very wrong assumption. The code in ReadBody seems to work as
>the old code did, where it will ignore a negative content_length setting
>(which meant it didn't see the header). However, the HtHTTP_Response
>constructor doesn't initialise it to -1. I think there will be a few
>other tests for this that will need to be reinserted as well.

I'll check better but, as far as I know, the code doesn't assume the
Content-Length header is always given. Indeed, more often, server answer by
giving you a chunked-body with dynamic size. The new code supports this as
the RFC of HTTP 1.1 says (not completely, because I think there's a part of
the response we can ignore). In this case Content-Length is not given ...
and I forgot to set the document size of the response in the
ReadChunkedBody() function. In fact, I had the content-length set properly,
but not the document size ... Yesterday I committed the change and now,
chunked bodies response have a right size (as far as I tested).

Of course, if I have enough time, I'll try to give a another look at the
code and you all please test the code.



Gabriele Bartolini
Computer Programmer (are U sure?)
U.O. Rete Civica - Comune di Prato
Prato - Italia - Europa


Zinedine "Zizou" Zidane. Just for soccer lovers.

To unsubscribe from the htdig3-dev mailing list, send a message to
You will receive a message to confirm this.

This archive was generated by hypermail 2b28 : Tue Feb 08 2000 - 00:09:19 PST