curl-library
Re: Decompression problems
Date: Fri, 17 Apr 2009 20:34:51 +0200 (CEST)
On Fri, 17 Apr 2009, Jonathan Wallace wrote:
> I hope someone can help me figure out what's going wrong with this thing,
> I've been fighting with it for months.
What libcurl version on what operating system? Do you by any chance have a
public URL that provides a problematic stream?
> headers = curl_slist_append(headers, "Accept: */*");
This is pointless. libcurl uses this on its own.
> headers = curl_slist_append(headers, "Accept-Encoding: deflate");
> curl_easy_setopt(curl, CURLOPT_ENCODING, "deflate");
This is confusing. CURLOPT_ENCODING will set the necessary headers. Adding
your own custom ones as well only risk to mess things up.
> string s = "LOSID=" + LOSID;
> headers = curl_slist_append(headers, s.c_str());
What? That's not a valid HTTP header. They must start with "[letters]:".
> headers = curl_slist_append(headers, "Connection: Keep-Alive");
This is pointless.
> headers = curl_slist_append(headers, "Authorization:");
This is just strange. It removes Authorization: headers, but libcurl doesn't
just randomly add any so there should be none to remove.
-- / daniel.haxx.seReceived on 2009-04-17