cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: zlib and 64-bit

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Sun, 22 May 2005 14:18:00 -0700

On Sat, May 21, 2005 at 03:11:23PM -0700, Cory Nelson wrote:
> When libcurl is compiled to use zlib, it crashes on gzipped data.
>
> When using zlib's file i/o functions directly, this crash doesn't
> happen. Because the file i/o functions use the stream functions, I'm
> betting it's not in the stream functions.
>
> Unfortunately VS2005 won't install for me on 64-bit (i have to
> cross-compile then reboot into the 64-bit edition), so I can't debug.
> I've been reviewing the significant portions of libcurl but I'm not
> very familiar with it and havn't turned up anything, so I'm hoping
> another set of eyes will be able to.
>
> I've attached a small test case, the URL's I've been using are
> http://inherent.blocklist.org/p2p.7z (works) and
> http://www.bluetack.co.uk/config/level1.gz (crashes)

The attached test case does not set the CURLOPT_ENCODING option, so libcurl's
gzip support is not enabled. Also, neither URL sets a Content-Encoding:
header, so even if it were enabled, libcurl's gzip support would not be
enabled. Whatever the source of the crash you are seeing, is doesn't seem to
be related to libcurl's zlib support.

I suspect the problem you're seeing is due to this warning in the libcurl
documentation for CURLOPT_WRITEDATA:

        NOTE: If you're using libcurl as a win32 DLL, you MUST use the
        CURLOPT_WRITEFUNCTION if you set this option or you will experience
        crashes.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2005-05-22