curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLE_WRITE_ERROR after update to 7.59.0

From: E T <etksubs_at_gmail.com>
Date: Tue, 10 Jul 2018 14:18:11 -0400

Hi Daniel,

I added the debug callback and added some tracing in our code, and it appears to be due to the encoding of the server response.

###ET### <= Recv header 2 bytes
###ET### <= Recv SSL data 5 bytes
###ET### <= Recv data 1348 bytes
###ET### => Info: Unrecognized content encoding type. libcurl understands identity content encodings.
###ET### => Info: Failed writing data

The received header is Content-Encoding: binary

We are using:
    curl_easy_setopt(m_hCurlHandle, CURLOPT_ENCODING, "");

I also tried:
    curl_easy_setopt(m_hCurlHandle, CURLOPT_ACCEPT_ENCODING, "");
And:
    curl_easy_setopt(m_hCurlHandle, CURLOPT_ACCEPT_ENCODING, "identity");

But the result is the same. I re-verified that 7.55.1 has no problem with this so I suspect something changed when adding the brotli support?

The full set of headers we are receiving from the server are:

HTTP/1.1 200 OK
Content-Type: application/x-pkcs12
Transfer-Encoding: chunked
Content-Encoding: binary
Connection: Keep-Alive
Date: Tue, 10 Jul 2018 17:13:51 GMT
X-Frame-Options: SAMEORIGIN
Content-Disposition: attachment; filename=etkal.p12

  Thanks,
  Erik Tkal
  Cisco Systems, Inc.

On Jul 7, 2018, at 10:20 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:

On Fri, 6 Jul 2018, etksubs_at_gmail.com wrote:

> We updated libcurl from 7.55.1 to 7.59.0 and are now getting CURLE_WRITE_ERROR from curl_easy_perform(). CURLOPT_WRITEFUNCTION and CURLOPT_HEADERFUNCTION are both set and the functions return size*nitems to all calls. I copied the 7.55.1 library back over from the older branch and it works fine again.
>
> The failing scenario appears to be when CURLOPT_HTTPGET is set, has anything specifically changed in this case between these releases?

We need a lot more detail to be able to tell - this is not a known problem. Tell us more about what your application does (including protocol and libcurl options used) and at what point you get this error etc.

-- 
/ daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2018-07-10