cURL / Mailing Lists / curl-library / Single Mail


How many garbage/ignored headers can I send to cURL?

From: Thorsten Schöning <>
Date: Sat, 8 Oct 2016 12:34:10 +0200

Hi all,

my question is related to the problem I described at SO[1]. Long story
short is that I have a web service which might process a request for
an hour or so and that no communication is happending in that time
period between server and client. Some proxies like Squid can be
configured to close a connection in such situations with no data
traffic at all for some period of time, look at read_timeout[2].

What I'm currently doing is creating a background thread in the server
which posts the HTTP status line and afterwards a custom, ever
changing and increasing header on a regular interval and which is
directly flushed to the client. This seems to work, cURL is processing
those headers and simply ignoring them.

What I'm wondering is, if there's any limit of the number of headers I
can send this way to cURL until it may run into an error? I've read of
max 100K per header and my headers are smaller. So does this mean I
can send as many as I want, because they are discarded after cURL
recognized them?


One example:

> HTTP/1.1 200 OK
> X-AMS-WipPrinterLoop.1: Processing
> X-AMS-WipPrinterLoop.2: Processing
> X-AMS-WipPrinterLoop.3: Processing
> X-AMS-WipPrinterLoop.99999: Processing
> [HTTP Body]


Mit freundlichen Grüßen,

Thorsten Schöning

Thorsten Schöning       E-Mail:
AM-SoFT IT-Systeme
Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04
AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
List admin:
Received on 2016-10-08