cURL / Mailing Lists / curl-library / Single Mail

curl-library

Curl --max-filesize return all headers (HTTP)

From: Brendan Doyle <doyle.brendan_at_yandex.com>
Date: Tue, 10 May 2016 02:11:31 +0200

Hi,

Would it be possible for curl to return all headers (in verbose mode) if the max-filesize limit is hit?

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?

Usage:
This way it is easier on the client side why a request fails by showing the actual size of the request, without making a new request...

Maybe the same goes for other options that i'm not aware of where the full headers can be useful.

--
Brendan
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html
Received on 2016-05-10