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...

- 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.

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Reply via email to