diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2017-09-04 10:45:02 +0200 | 
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2017-09-05 09:47:46 +0200 | 
| commit | 3130414ce715deb15e6fbd2019362bfee67ca2b4 (patch) | |
| tree | 406836d703249121a3b2343833625fa921ac0079 /lib | |
| parent | d491a9c3a86075eef6f423d0f44802ccfac8908d (diff) | |
http-proxy: treat all 2xx as CONNECT success
Added test 1904 to verify.
Reported-by: Lawrence Wagerfield
Fixes #1859
Closes #1860
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/http_proxy.c | 7 | 
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/http_proxy.c b/lib/http_proxy.c index 5a1dc0b86..7b2760446 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -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  */  | 
