mirror of
https://github.com/curl/curl.git
synced 2026-07-24 05:17:17 +03:00
http-proxy: treat all 2xx as CONNECT success
Added test 1904 to verify. Reported-by: Lawrence Wagerfield Fixes #1859 Closes #1860
This commit is contained in:
parent
d491a9c3a8
commit
3130414ce7
3 changed files with 84 additions and 4 deletions
|
|
@ -567,7 +567,7 @@ static CURLcode CONNECT(struct connectdata *conn,
|
|||
if(error)
|
||||
return CURLE_RECV_ERROR;
|
||||
|
||||
if(data->info.httpproxycode != 200) {
|
||||
if(data->info.httpproxycode/100 != 2) {
|
||||
/* Deal with the possibly already received authenticate
|
||||
headers. 'newurl' is set to a new URL if we must loop. */
|
||||
result = Curl_http_auth_act(conn);
|
||||
|
|
@ -598,7 +598,7 @@ static CURLcode CONNECT(struct connectdata *conn,
|
|||
|
||||
} while(data->req.newurl);
|
||||
|
||||
if(200 != data->req.httpcode) {
|
||||
if(data->info.httpproxycode/100 != 2) {
|
||||
if(closeConnection && data->req.newurl) {
|
||||
conn->bits.proxy_connect_closed = TRUE;
|
||||
infof(data, "Connect me again please\n");
|
||||
|
|
@ -634,7 +634,8 @@ static CURLcode CONNECT(struct connectdata *conn,
|
|||
|
||||
data->state.authproxy.done = TRUE;
|
||||
|
||||
infof(data, "Proxy replied OK to CONNECT request\n");
|
||||
infof(data, "Proxy replied %d to CONNECT request\n",
|
||||
data->info.httpproxycode);
|
||||
data->req.ignorebody = FALSE; /* put it (back) to non-ignore state */
|
||||
conn->bits.rewindaftersend = FALSE; /* make sure this isn't set for the
|
||||
document request */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue