cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: I've found that libcurl isn't sending params sometimes to NTLM proxies?

From: Theodore H. Smith <delete_at_elfdata.com>
Date: Thu, 30 Oct 2008 15:16:32 +0000

Any work arounds anyone?

We really need a work around so we can send parameters via our NTLM
proxy.

On 30 Oct 2008, at 13:59, Theodore H. Smith wrote:

>
> Hi libcurl group,
>
> Thanks to Daniel's advice, I managed to get somewhere. It seems
> libcurl really ISNT sending the params sometimes. So the fault seems
> to be with libcurl. Here is the output. It's NOT using the curl
> executable, as it was harder to reproduce the error there. I did try
> to use a format similar to the one curl outputs, but it's not
> identical :)
>
> Also... for what it's worth, this error rarely happens unless I use
> the "multi" interface.
>
> == Info: Expire cleared
> == Info: Connection #0 to host **.**.**.** left intact
> == Info: About to connect() to proxy **.**.**.** port 808 (#0)
> == Info: Trying **.**.**.**... == Info: connected
> == Info: Connected to **.**.**.** (**.**.**.**) port 808 (#0)
> == Info: Proxy auth using NTLM with user ********
> => Send header: POST http://*******.com HTTP/1.1
>
> Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
>
> Host: *******.com
>
> Pragma: no-cache
>
> Accept: */*
>
> Proxy-Connection: Keep-Alive
>
> Content-Length: 0
>
>
>
> <= Recv header: HTTP/1.1 200 OK
>
> <= Recv header: Date: Thu, 30 Oct 2008 13:45:44 GMT
>
> <= Recv header: Server: Apache/2.2.8 (Ubuntu) mod_jk/1.2.25 mod_ssl/
> 2.2.8 OpenSSL/0.9.8g
>
> <= Recv header: Keep-Alive: timeout=15, max=100
>
> <= Recv header: Transfer-Encoding: chunked
>
> <= Recv header: Content-Type: text/plain
>
> <= Recv header: Proxy-connection: Keep-Alive
>
> <= Recv header:
>
> => Send data
> 10
>
> Undefined 'lea'
>
>
> 0
>
>
> == Info: Connection #0 to host **.**.**.** left intact
> == Info: Closing connection #0
>
>
>
> (end of dump)
>
> So... I don't see it generate the "lea" form thing. For what it's
> worth... when this connection does work, I DO see libcurl generate
> the form data in the output! Like this:
>
> "
>
> ------------------------------9ea4b9344a58
>
> Content-Disposition: form-data; name="lea"
>
> Content-Type: application/binary
>
>
>
> le2
>
> "
>
> OK... so... it's not sending the "lea" param sometimes, and those
> are the times my server complains that "lea" is missing.
>
> Once again, these things tend to set this error off more:
>
> 1) Fast connections one after the other. (something to do with
> "Connection #0 to host **.**.**.** left intact" above??)
>
> 2) Using the "multi" interface, which allows me to get stuff over
> the internet without locking up my apps GUI.
>
>
> Avoiding the multi interface isn't going to do me much good, unless
> I don't mind my GUI locking up anytime the user wants to do
> anything. Behaviour like this isn't acceptable.
>
> As we can tell that this has something to do with connections being
> reused... is there some kind of work around? Perhaps... some option
> to tell libcurl to NOT reuse existing connections?
>
> At least not reuse connections across different "easy curl" instances.
>
> I tried turning off reuse connections, via CURLOPT_FORBID_REUSE, but
> that basically froze my app entirely, because it didn't allow reuse
> of a connection INSIDE one "easy curl" instance! And NTLM needs
> multiple connections to get anywhere. So curl never got anywhere or
> gave up trying to get there.
>
> is there a better way to turn off reusing of connections across
> different "easy curl" instances?
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html

--
http://elfdata.com/plugin/
"String processing, done right"
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2008-10-30