cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problem with content-length and content-encoding: gzip

From: Erik Rehrmann <rehrmann_at_ion.ag>
Date: Fri, 20 Jun 2003 17:05:21 +0200

Hi all,

I'm using libcurl (7.10.5) as the transport layer for xmlrpc-c and trying to use the content-encoding feature (curl_easy_setopt(curl, CURLOPT_ENCODING, "gzip");).

Unfortuately it seems to me as if the content-length of the server response (Marquee XMLRPC - Java) is evaluated although it doesn't contain the compressed data size. RFC 2616 does not well describe the content-length content if the content is encoded, so I don't know who's wrong, the server which sends the response with the "real"-length, or libcurl which evaluates the content-length.

Below you can find a code snippet where the error occurs

Any help on this is greatly appreciated,

Erik

----snip----

transfer.c:

if(!(data->set.no_body) && k->contentlength &&
       (k->bytecount != k->contentlength) && // <--- that's the problem
       !conn->newurl) {
      failf(data, "transfer closed with %d bytes remaining to read",
            k->contentlength-k->bytecount);
      return CURLE_PARTIAL_FILE;
    }

----snap----

-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
Received on 2003-06-20