cURL / Mailing Lists / curl-library / Single Mail


Re: Forcing curl auto_decoding

From: Mike Hommey <>
Date: Sun, 8 May 2016 07:24:03 +0900

On Sat, May 07, 2016 at 11:52:16PM +0200, Daniel Stenberg wrote:
> On Sat, 7 May 2016, Mike Hommey wrote:
> > Is there any way I can trick libcurl into doing the decoding as if the
> > response headers indicated the stream is deflated? It would be a bummer
> > if I need to handle the inflate on my own, duplicating functionality
> > that is already there in libcurl...
> I can't think of any way to trick the existing libcurl into doing this.
> - But what's their reason for not including the HTTP header in the response
> that would be signal enough for a HTTP client to figure this out in the
> first place? I mean, even if we'd think of a way to add this feature to
> libcurl for cases like this, there could still be others out there who'd
> like to use another HTTP client and they might then easily face the same
> problem again, ending up in lots of changes being necessary when the server
> could easily be made more HTTP friendly...

Oversight is the only reason, and they're open to fixing it, but the
problem is that it won't fix the existing servers.

> - Thinking about possible ways we could potentially introduce to make
> libcurl support this, it struck me that it could possibly be cool to offer a
> way for an application to inject response headers to libcurl as if they
> arrived from the server, so that a client could change behaviors like in
> your case. I haven't thought it through fully, but it could certainly be a
> way that would be a somewhat generic feature to alter libcurl's behaviors to
> specific server responses, and it would work for your particular case I
> think.

It makes sense.

In the meantime, I'll just have to inflate on my own, not that it's a
lot of code anyways...


List admin:
Received on 2016-05-08