curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.


From: Henrik Holst via curl-library <>
Date: Fri, 19 May 2023 01:19:25 +0200

I did some more digging around on what the various http servers uses and
while it is 8k on most servers (apache, nginx) it is 16k on IIS but it is
also configurable on all http servers. So it can be set to be higher on
apache, nginx, IIS and most other http servers out there. So having it be
configurable in libcurl as well does IMHO not sound that outlandish.


Den tors 18 maj 2023 kl 09:09 skrev Benjamin Herrenschmidt via curl-library

> On Wed, 2023-05-17 at 16:44 +0200, Daniel Stenberg wrote:
> > On Wed, 17 May 2023, Benjamin Herrenschmidt via curl-library wrote:
> >
> > > And more specifically by the 8KB limit applied to the cookier headers.
> >
> > Back again, having done some more thinking.
> >
> > The main problem with upping this limit is that a typical user don't
> know what
> > the maximum allowed line length in the other end is. The limit was
> introduced
> > because it was noticed that (some) servers will treat a too long line as
> a
> > serious error and repond with a 400.
> >
> > If curl receives a set of cookies that combined needs TOO_LONG bytes to
> get
> > sent over the wire, and it gets a 400 back, then curl is pretty much
> stuck and
> > can't do anything against that server without some actions or when enough
> > number of cookies expire...!
> >
> > So: not an easy limit to toy around with.
> Ok. I got some data from the main affected customer in the meantime:
> They are using curl to authenticate to ADFS using Kerberos and SAML
> config. The Kerberos token itself is 6.8k in size. The cookie was 3.5k.
> That brings it to 10.3k.
> They also pointed to some MSFT documentation (link below) where it says
> the default header size for IIS is 16KB.
> I agree that the failure mode you describe is ... sub-optimal. It was
> my understanding the limit was introduced to fix a CVE caused by
> unbounded growth but I might be mistaken.
> Any better idea to solve the issue ? We (Amazon) could carry a
> downstream only patch for our curl but I don't like that option much...
> The above seems to be a legitimate use case.
> Cheers,
> Ben.
> --
> Unsubscribe:
> Etiquette:

Received on 2023-05-19