aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-09-04 10:18:12 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-09-04 10:18:12 +0000
commit8fae12b2f1d110cf805df87c6a5448334f8d8355 (patch)
tree2ed79a2f46ff58926923702a71f0a08a73932f0a /lib
parent7410210f198c88ad9563f6ac5b50218063d91070 (diff)
1. store the httpproxycode in the loop after it is parsed
2. made Curl_http_auth_act() reset 'authavail' unconditionally
Diffstat (limited to 'lib')
-rw-r--r--lib/http.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/http.c b/lib/http.c
index 3b447dddc..e757a828d 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -175,10 +175,9 @@ void Curl_http_auth_act(struct connectdata *conn)
data->state.authwant = CURLAUTH_NONE; /* none */
if(data->state.authwant)
- conn->newurl = strdup(data->change.url); /* clone string */
-
- data->state.authavail = CURLAUTH_NONE; /* clear it here */
+ conn->newurl = strdup(data->change.url); /* clone URL */
}
+ 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",
&subversion,
&httpcode)) {
- ;
+ /* store the HTTP code */
+ data->info.httpproxycode = httpcode;
}
/* put back the letter we blanked out before */
line_start[perline]= letter;
@@ -850,9 +850,6 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn,
} while(conn->newurl);
- /* store the HTTP code after the looping is done */
- data->info.httpproxycode = httpcode;
-
if(200 != httpcode) {
failf(data, "Received HTTP code %d from proxy after CONNECT", httpcode);
return CURLE_RECV_ERROR;