cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: hang with NTLM auth on both proxy and host during upload

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 8 Jun 2004 10:28:30 +0200 (CEST)

On Mon, 7 Jun 2004, David Byron wrote:

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

...

> 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)) {

That is indeed weird. It looks like it gets caught there on the second set of
response-headers returned by the server. Can you debug or otherwise figure out
why it doesn't reach the point where it detects the end of the
response-headers? (lib/http.c:1067 in my copy).

I don't have access any servers using NTLM so I'm feeling a bit handicapped.

> 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.

I suggest you start with the https:// case first, then perhaps the http://
case will be easy to fix or it gets fixed at the same time.

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

I don't think it is, I can guess what the trace should look like.

> 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.

My biggest question when looking at this, is why it claims to use server auth
when it only authenticates with the proxy. It looks like something is truly
wrong.

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-06-08