1
0
mirror of https://github.com/moparisthebest/curl synced 2025-03-11 15:50:48 -04:00

1. store the httpproxycode in the loop after it is parsed

2. made Curl_http_auth_act() reset 'authavail' unconditionally
This commit is contained in:
Daniel Stenberg 2003-09-04 10:18:12 +00:00
parent 7410210f19
commit 8fae12b2f1

View File

@ -175,10 +175,9 @@ void Curl_http_auth_act(struct connectdata *conn)
data->state.authwant = CURLAUTH_NONE; /* none */ data->state.authwant = CURLAUTH_NONE; /* none */
if(data->state.authwant) if(data->state.authwant)
conn->newurl = strdup(data->change.url); /* clone string */ conn->newurl = strdup(data->change.url); /* clone URL */
data->state.authavail = CURLAUTH_NONE; /* clear it here */
} }
data->state.authavail = CURLAUTH_NONE; /* clear it here */
} }
/* /*
@ -827,7 +826,8 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn,
else if(2 == sscanf(line_start, "HTTP/1.%d %d", else if(2 == sscanf(line_start, "HTTP/1.%d %d",
&subversion, &subversion,
&httpcode)) { &httpcode)) {
; /* store the HTTP code */
data->info.httpproxycode = httpcode;
} }
/* put back the letter we blanked out before */ /* put back the letter we blanked out before */
line_start[perline]= letter; line_start[perline]= letter;
@ -850,9 +850,6 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn,
} while(conn->newurl); } while(conn->newurl);
/* store the HTTP code after the looping is done */
data->info.httpproxycode = httpcode;
if(200 != httpcode) { if(200 != httpcode) {
failf(data, "Received HTTP code %d from proxy after CONNECT", httpcode); failf(data, "Received HTTP code %d from proxy after CONNECT", httpcode);
return CURLE_RECV_ERROR; return CURLE_RECV_ERROR;