cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Problems

From: jianghao <realjiangms_at_hotmail.com>
Date: Sat, 16 Aug 2008 15:03:38 +0800

Hello dan,
 
1. > Curl_base64_encode shouldn't ever be called with a NULL indata. This patch> points to a problem in the caller. In which context is this pointer NULL?> Maybe the problem is in the caller.I produced this trouble when I try to use curl to connect a server of weblogic815 using Negotiate
authentication.You may need to check lib/http_negotiate.c. The caller is Curl_output_negotiate, line 316: len = Curl_base64_encode(conn->data,neg_ctx->output_token.value, neg_ctx->output_token.length,
              &encoded);It occured after server closed the connection.
2.
> > 2.When doing ntlm authentication, curl will get into infinite loops> > (although it will stop after about 50 repeats) if server always close the> > connection after sending the response with the NTLM challenge string> > My understanding is that NTLM authenticates the connection, not the session,> so it would be impossible to use NTLM if the server closes the connection.>
It's true that NTLM authenticates the connection, but it depends on the challenge string sent from server.The process of my understanding is this: client server1 ->"NTLMSSP"2 challenge string<-3 ->response string4 "http200 OK"<-if server close the connection at step 2, then curl will play as follow: curl server1 ->"NTLMSSP"2 challenge string<-, closed 2.1 curl get the challeng string and change ntlm state to NTLMSTATE_TYPE2 They are stored in conn->ntlm.state and conn->ntlm.nonce 2.2 curl detect that connection has been closed 2.3 clean connection datas 2.4 reopen another connection. 2.5 conn->ntlm.state=0 (NTLMSTATE_NONE)3 ->"NTLMSSP"4 another challenge string<-, closed.....so it get into loopI produced this when the server was Webshpere server 6.1, if you have leisure, you can try it.
 
Both two were occured on fedora8.If you need more infomation, I can send you the output log produced by curl -v.
 
Thank you for you help.
zihao
_________________________________________________________________
MSN 中文网,最新时尚生活资讯,白领聚集门户。
http://cn.msn.com

-------------------------------------------------------------------
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-08-16