curl-library
Re: header bytes not being reset on each perform
Date: Wed, 24 Jan 2001 08:06:22 +0100 (MET)
On Tue, 23 Jan 2001, Rick Jones wrote:
> the attached test program seems to imply that the header bytes from
> curl_easy_getinfo() are not being reset on each request:
Are you absolutely sure the headers weren't in fact being larger for each
time the request was re-sent?
I checked this out, in curl_open() in url.c where the whole Urldata struct is
malloc()ed and memset() to zero (including the header_size field).
The header_size field is then increased on two places in _Transfer() (now
placed in transfer.c, previously in highlevel.c).
Finally, it is read in curl_getinfo() in getinfo.c. I can't see where in this
chain, it would get a modified value.
> # ./curl_test2
> total time 0.00914, bytes 1048766 connect 0.008059
> header bytes 190 download size 1048576.000000 request_bytes 129
> total time 0.00914, bytes 2097532 connect 0.013123
> header bytes 380 download size 1048576.000000 request_bytes 129
> total time 0.00914, bytes 3146298 connect 0.018558
> header bytes 570 download size 1048576.000000 request_bytes 129
What if you show the headers, would that bring any clues?
> is this a known problem, or is it supposed to behave that way? (seems
> inconsistent with the request bytes and the download bytes
It is not a known problem but I can't find where this flaw would be!
-- Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/ _______________________________________________ Curl-library mailing list Curl-library_at_lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/curl-libraryReceived on 2001-01-24