curl-library
How many garbage/ignored headers can I send to cURL?
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?
Thanks!
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]
[1]: http://stackoverflow.com/questions/39922792/how-to-tell-a-proxy-a-connection-is-still-used-using-http-communication
[2]: http://www.squid-cache.org/Doc/config/read_timeout/
Mit freundlichen Grüßen,
Thorsten Schöning
-- Thorsten Schöning E-Mail: Thorsten.Schoening_at_AM-SoFT.de AM-SoFT IT-Systeme http://www.AM-SoFT.de/ 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: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2016-10-08