curl-users
Re: Turning on NTLM proxies, causes some form variables to not be sent
Date: Wed, 29 Oct 2008 21:06:11 +0000
On 29 Oct 2008, at 20:22, Dan Fandrich wrote:
> On Wed, Oct 29, 2008 at 08:06:07PM +0000, Theodore H. Smith wrote:
>> I don't know what is making this problem, but here it is:
>>
>> When I turn on NTLM proxies, some form variables are not sent to the
>> server. Sometimes, that is. Sometimes they are sent, othertimes not.
>>
>> I can't see any consistant pattern. It seems kind of random.
>>
>> I am getting this error both with libcurl, AND with the curl
>> command line
>> tool!
>
> What version of curl are you using? What platform?
>
>> What information do you need from me to help pin this problem down?
>> NTLM
>> support is pretty important to us.
>
> Since it sounds like you can reproduce it relatively easily, try
> running
> the curl command-line in a loop, using the -v option. When you get a
> failure case, look at the debug output. That will tell you whether
> curl
> has (or at least thinks it has) sent the data or not. If it has, then
> you can more confidently point blame at the proxy server.
Hi Dan,
Thanks for your answer. To answer your "platform&version" question...
I tried your "-v" suggestion. libcurl told me this.
> User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3
OpenSSL/0.9.7l zlib/1.2.3
Funnily enough I have a MacBookPro (runs in Intel!), so it's not
powerpc, but Intel. But anyhow, that's what libcurl thinks my computer
is. It shouldn't make a difference though?
I'll show you the command I used, with sensitive sections blanked out.
curl -v -F "d=1" -F "lea=le2" -F "p=Mac" -F "school=mosshall" -F
"success=OK21527" -F "teacher=*******" -F "time=1225313303" -F
"userpass=**********" -F "v=001023" -F "dev=1" --proxy-ntlm --proxy-
user ******:******* --proxy **.**.**.**:808 http://*******.com/cgi-bin/
********.pl
Here is what I got:
* About to connect() to proxy **.**.**.** port 808 (#0)
* Trying **.**.**.**... connected
* Connected to **.**.**.** (**.**.**.**) port 808 (#0)
* Proxy auth using NTLM with user '*****'
> POST http://*******.com/cgi-bin/*******.pl HTTP/1.1
> Proxy-Authorization: NTLM
TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
> User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3
OpenSSL/0.9.7l zlib/1.2.3
> Host: *******.com
> Pragma: no-cache
> Accept: */*
> Proxy-Connection: Keep-Alive
> Content-Length: 0
>
< HTTP/1.1 200 OK
< Date: Wed, 29 Oct 2008 20:57:45 GMT
< Server: Apache/2.2.8 (Ubuntu) mod_jk/1.2.25 mod_ssl/2.2.8 OpenSSL/
0.9.8g
< Keep-Alive: timeout=15, max=100
< Transfer-Encoding: chunked
< Content-Type: text/plain
< Proxy-connection: Keep-Alive
<
Undefined 'lea'
* Connection #0 to host 84.92.86.44 left intact
* Closing connection #0
"Undefined 'lea'" is an error MY perl scripts are returning. That
means... they didn't see the "lea". However, I DID pass it there!!!
You can see "lea=le2". So I am passing it!
So I tried another attempt with no proxy
curl -v -F "d=1" -F "lea=le2" -F "p=Mac" -F "school=mosshall" -F
"success=OK21527" -F "teacher=*******" -F "time=1225313303" -F
"userpass=**********" -F "v=001023" -F "dev=1" http://*******.com/cgi-
bin/*******.pl
* About to connect() to *********.com port 80 (#0)
* Trying **.**.**.***... connected
* Connected to *********.com (**.**.**.***) port 80 (#0)
> POST /cgi-bin/***************.pl HTTP/1.1
> User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3
OpenSSL/0.9.7l zlib/1.2.3
> Host: **********.com
> Accept: */*
> Content-Length: 1057
> Expect: 100-continue
> Content-Type: multipart/form-data;
boundary=----------------------------6a3a54a11e0f
>
< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Date: Wed, 29 Oct 2008 20:59:13 GMT
< Server: Apache/2.2.8 (Ubuntu) mod_jk/1.2.25 mod_ssl/2.2.8 OpenSSL/
0.9.8g
< Transfer-Encoding: chunked
< Content-Type: text/plain
<
<loads_of_xml>
....
</loads_of_xml>
* Connection #0 to host **********.com left intact
* Closing connection #0
So... basically this one outputs the XML I expected. Because it found
the "lea=le2" thing. Whereas... using a proxy, the "lea=le2" did not
get passed through.
OK, so you said this: "If it has, then you can more confidently point
blame at the proxy server."
Does that mean my proxy server is bad? Is there a "known good" NTLM
server I can test somewhere? Anyone got one? By the way, this proxy
server is running on Windows, and made by Microsoft. So that's never a
good sign :) But of course that doesn't mean it's broken just because
it's made by Microsoft.
Any idea what my next step is? Thanks for the help so far!!
At least you helped me eliminate my source code as the source of the
problem! Because in this case, there was none of my source code.
-------------------------------------------------------------------
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-29