cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: NTLM proxy authentication with CURLOPT_READDATA seems broken.

From: Spacen Jasset <spacenjasset_at_yahoo.co.uk>
Date: Wed, 05 Dec 2007 11:13:10 +0000

It looks like the calls to Curl_setup_transfer are wrong, they should
use postsize to 'tern' on rather than http->postdata which is always
true. The POSTFIELD version uses postsize.

With these changes it works as expected.

cvs -q diff -u -- http.c (in directory
V:\projects\3rdParty\curl-7.17.0\lib\)
Index: http.c
===================================================================
RCS file: /cvsroot/3rdParty/curl-7.17.0/lib/http.c,v
retrieving revision 1.1
diff -u -r1.1 http.c
--- http.c 26 Sep 2007 14:05:38 -0000 1.1
+++ http.c 5 Dec 2007 11:06:43 -0000
@@ -2510,8 +2510,8 @@
          result =
            Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE,
                                &http->readbytecount,
- http->postdata?FIRSTSOCKET:-1,
- http->postdata?&http->writebytecount:NULL);
+ postsize?FIRSTSOCKET:-1,
+ postsize?&http->writebytecount:NULL);
        break;

      default:
@@ -2529,8 +2529,8 @@
          /* HTTP GET/HEAD download: */
          result = Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE,
                                 &http->readbytecount,
- http->postdata?FIRSTSOCKET:-1,
- http->postdata?&http->writebytecount:NULL);
+ postsize?FIRSTSOCKET:-1,
+ postsize?&http->writebytecount:NULL);
      }
      if(result)
        return result;

***** CVS exited normally with code 1 *****
Received on 2007-12-05