cURL / Mailing Lists / curl-library / Single Mail

curl-library

Changed behaviour in curl-7.20.1 ?

From: Cosmin Luță <cosmin.luta_at_avira.com>
Date: Thu, 22 Apr 2010 12:03:59 +0300

Hello,

Please look at the test code found at http://pastebin.org/167215
it's a small program that attempts to post some data to a website and
immediatly aborts the upload by returning a non-zero value from the
progress callback.

I'm noticing a different behaviour between the curl library installed
in my system (curl-7.19.7) and the latest version (curl-7.20.1):

% gcc -o test test.c -lcurl
% ldd test
        linux-gate.so.1 => (0x00f73000)
        libcurl.so.4 => /usr/lib/libcurl.so.4 (0x00d8c000)
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00110000)
        libidn.so.11 => /usr/lib/libidn.so.11 (0x00f23000)
        liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0x007d5000)
        libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0x002dc000)
        librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0x00d2f000)
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x0026a000)
        libssl.so.0.9.8 => /lib/i686/cmov/libssl.so.0.9.8 (0x0043b000)
        libcrypto.so.0.9.8 => /lib/i686/cmov/libcrypto.so.0.9.8
(0x00481000) libz.so.1 => /lib/libz.so.1 (0x0080a000)
        /lib/ld-linux.so.2 (0x00b9c000)
        libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0x00299000)
        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x002ad000)
        libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0x00323000)
        libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0
(0x003be000) libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x005d3000)
        libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00cb5000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0x002c5000)
        libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00aed000)
        libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x00826000)
        libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x002c9000)
        libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0x003d7000)
        libgcrypt.so.11 => /lib/libgcrypt.so.11 (0x00684000)
        libgpg-error.so.0 => /lib/libgpg-error.so.0 (0x002cd000)

(the above test program is linked against the library in the system)
% ./test
libcurl returned: Operation was aborted by an application callback

% LD_LIBRARY_PATH=`pwd`/lib ldd test
        linux-gate.so.1 => (0x00290000)
        libcurl.so.4
=> /home/work/curl-7.20.1-installed/lib/libcurl.so.4 (0x00a44000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00110000) libidn.so.11
=> /usr/lib/libidn.so.11 (0x009ce000) libldap_r-2.4.so.2
=> /usr/lib/libldap_r-2.4.so.2 (0x003b9000) librt.so.1
=> /lib/tls/i686/cmov/librt.so.1 (0x00630000) libssl.so.0.9.8
=> /lib/i686/cmov/libssl.so.0.9.8 (0x00e57000) libcrypto.so.0.9.8
=> /lib/i686/cmov/libcrypto.so.0.9.8 (0x00421000) libz.so.1
=> /lib/libz.so.1 (0x0026a000) /lib/ld-linux.so.2 (0x00404000)
        liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0x00f8a000)
        libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0x00fe7000)
        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x00719000)
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00291000)
        libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0x00bf5000)
        libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0
(0x002c0000) libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x0027f000)
        libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x002d9000)
        libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x007b5000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0x009ad000)
        libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00283000)
        libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x0028b000)
        libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0x0093a000)
        libgcrypt.so.11 => /lib/libgcrypt.so.11 (0x00ebd000)
        libgpg-error.so.0 => /lib/libgpg-error.so.0 (0x00aee000)

(recompiled and using curl 7.20.1 now)

% LD_LIBRARY_PATH=`pwd`/lib ./test
libcurl returned: Couldn't connect to server

Can anyone tell me why with the new library the returned error code is
"Couldn't connect to server" (which seems wrong to me imo)? Is this
expected behaviour?

Thanks!
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-04-22