cURL / Mailing Lists / curl-library / Single Mail

curl-library

PATCH: Fix for bug 440

From: Arunav Sanyal <arunav.sanyal91_at_gmail.com>
Date: Wed, 27 Mar 2013 22:47:43 +0530

Refer to http://curl.haxx.se/mail/lib-2013-03/0273.html for conversation

Fix : Fixes bug 440, which is negotiate authentication option needs fake
user (-u: option)

File edited : http.c

command run:- diff http.c http_new.c(on ubuntu 12.10 gnu diff)

442c442,443
< if(((data->req.httpcode == 401) ||

---
>   if(conn->bits.user_passwd &&
>      ((data->req.httpcode == 401) ||
448c449,450
<   if(((data->req.httpcode == 407) ||
---
>   if(conn->bits.proxy_user_passwd &&
>      ((data->req.httpcode == 407) ||
624,632d625
<
<   if((conn->bits.httpproxy && conn->bits.proxy_user_passwd) ||
<      conn->bits.user_passwd)
<     /* continue please */ ;
<   else {
<     authhost->done = TRUE;
<     authproxy->done = TRUE;
<     return CURLE_OK; /* no authentication with no user or password */
<   }
Test cases : Tested for spnego authentication (GSS-negotiate). DID NOT TEST
for basic, digest, ntlm authentication.
Please validate this patch and let me know about any changes.
-- 
Arunav Sanyal
4th year undergraduate student
B.E (Hons) Computer Science
BITS Pilani K.K Birla Goa Campus

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-03-27