Guido Berhoerster
2018-02-15 15:54:27 UTC
The header callback will be called once for each header and only
complete header lines are passed on to the callback. Parsing headers
is very easy using this.
This seems to be completely wrong, headers are chopped into chunkscomplete header lines are passed on to the callback. Parsing headers
is very easy using this.
of CURL_MAX_WRITE_SIZE by Curl_client_chop_write(). The only way to
distinguish a complete header seems to be a check whether the last
character is a 0x0a.
I don't think that most client code is aware of this, naive
implementations e.g. check for either a single 0x0a or a 0x0d 0x0a in
order to delimit responses. IMO this makes dealing with headers more
tedious than it already is, so I think it would be better to fix the
code to match the implementation rather than the other way around.
A complete HTTP header that is passed to this function can be up to
CURL_MAX_HTTP_HEADER (100K) bytes.
This also doesn't seem to be true, with libcurl 7.55.1 headers up toCURL_MAX_HTTP_HEADER (100K) bytes.
~ 190K are read although I haven't checked where that limit actually
comes from.
--
Guido Berhoerster
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquett
Guido Berhoerster
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquett