curl-library
Re: Curl --max-filesize return all headers (HTTP)
Date: Mon, 16 May 2016 10:45:40 +0200 (CEST)
On Tue, 10 May 2016, Brendan Doyle wrote:
> Would it be possible for curl to return all headers (in verbose mode) if the
> max-filesize limit is hit?
I suppose it could be changed to do provide all headers in that case, although
I don't think it should be tied to verbose mode. Headers are delivered to the
header callback independent of verbose.
> It seems (but I don't know) curl parses the server headers, if it finds
> Content-Length it will compare it with the --max-filesize option and if this
> is larger it stops parsing and exits with curl: (63) Maximum file size
> exceeded. Would it be possible to keep parsing the headers and fail after
> the last header instead?
The comparison logic would have to be moved, but sure. Feel free to write up a
patch!
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2016-05-16