cURL / Mailing Lists / curl-library / Single Mail

curl-library

hang with NTLM auth on both proxy and host during upload

From: David Byron <DByron_at_everdreamcorp.com>
Date: Mon, 7 Jun 2004 12:16:28 -0700

curl from current CVS hangs for me in the following case:

./curl https://my_server/my_page -k --verbose -F File=@dummy.txt --user
user:pass --ntlm --proxy http://my_proxy:proxy_port --proxy-user
proxy_user:proxy_pass --proxy-ntlm

like this:

* About to connect() to my_proxy port proxy_port
* Connected to my_proxy (my_proxy) port proxy_port
* Establish HTTP proxy tunnel to my_server
* Proxy auth using NTLM with user 'proxy_user'
* Server auth using NTLM with user 'user'
< HTTP/1.1 407 Proxy Authentication Required ( Access is denied. )
< Via:1.1 QE-COBPROXY
< Proxy-Authenticate: NTLM
TlRMTVNTUAACAAAAAAAAADAAAAACAgAApyr+N1ZGlP0AAAAAAAAAAAAAAAAwAAAA
< Connection: Keep-Alive
< Proxy-Connection: Keep-Alive
< Pragma: no-cache
< Cache-Control: no-cache
< Content-Type: text/html
< Content-Length: 0
<
* Proxy auth using NTLM with user 'proxy_user'
* Server auth using NTLM with user 'user'
< HTTP/1.1 200 Connection established
< Via: 1.1 QE-COBPROXY
<
* Proxy auth using NTLM with user 'proxy_user'
* Server auth using NTLM with user 'user'

dummy.txt just contains:

foo

but I don't think that matters.

I tried getting a stack trace from gdb with no luck. I put in a couple
of infof calls, and it seems curl is looping in
Curl_ConnectHTTPProxyTunnel, like this:

987 while((nread<BUFSIZE) && (keepon && !error)) {
(gdb)
988 readfd = rkeepfd; /* set every lap */
(gdb)
989 interval.tv_sec = 1; /* timeout each second and check the
timeout */
(gdb)
990 interval.tv_usec = 0;
(gdb)
992 if(data->set.timeout) {
(gdb)
1003 switch (select (tunnelsocket+1, &readfd, NULL, NULL,
&interval)) {

This also hangs with plain old http (changing the url to just http://
and removing the -k), but in a different place -- Transfer() in
transfer.c, in kind of a similar loop.

IE works in both cases. I can send the trace if it's useful.

Any ideas? I still haven't come up to speed on the new auth stuff. If
anyone's got a pointer of where to look in the code that'll help me fix
this myself, great.

Thanks much.

-DB
Received on 2004-06-07