Loading lib/http.c +6 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -2305,6 +2305,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) "%s" /* TE: */ "%s" /* accept-encoding */ "%s" /* referer */ "%s" /* Proxy-Connection */ "%s",/* transfer-encoding */ ftp_typecode, Loading @@ -2327,6 +2328,10 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) conn->allocptr.accept_encoding:"", (data->change.referer && conn->allocptr.ref)? conn->allocptr.ref:"" /* Referer: <data> */, (conn->bits.httpproxy && !conn->bits.tunnel_proxy && !Curl_checkProxyheaders(conn, "Proxy-Connection:"))? "Proxy-Connection: Keep-Alive\r\n":"", te ); Loading lib/http_proxy.c +9 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -160,6 +160,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, if(!result) { char *host=(char *)""; const char *proxyconn=""; const char *useragent=""; const char *http = (conn->proxytype == CURLPROXY_HTTP_1_0) ? "1.0" : "1.1"; Loading @@ -185,6 +186,9 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, return CURLE_OUT_OF_MEMORY; } } if(!Curl_checkProxyheaders(conn, "Proxy-Connection:")) proxyconn = "Proxy-Connection: Keep-Alive\r\n"; if(!Curl_checkProxyheaders(conn, "User-Agent:") && data->set.str[STRING_USERAGENT]) useragent = conn->allocptr.uagent; Loading @@ -194,13 +198,15 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, "CONNECT %s HTTP/%s\r\n" "%s" /* Host: */ "%s" /* Proxy-Authorization */ "%s", /* User-Agent */ "%s" /* User-Agent */ "%s", /* Proxy-Connection */ hostheader, http, host, conn->allocptr.proxyuserpwd? conn->allocptr.proxyuserpwd:"", useragent); useragent, proxyconn); if(host && *host) free(host); Loading tests/data/test1001 +2 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ Host: %HOSTIP:%HTTPPORT Content-Range: bytes 2-4/5 User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6 Accept: */* Proxy-Connection: Keep-Alive Content-Length: 0 GET http://%HOSTIP:%HTTPPORT/1001 HTTP/1.1 Loading @@ -96,6 +97,7 @@ Host: %HOSTIP:%HTTPPORT Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1001", response="6af4d89c952f4dd4cc215a6878dc499d" Content-Range: bytes 2-4/5 Accept: */* Proxy-Connection: Keep-Alive Content-Length: 3 Expect: 100-continue Loading tests/data/test1002 +3 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ Host: %HOSTIP:%HTTPPORT Content-Range: bytes 2-4/5 User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6 Accept: */* Proxy-Connection: Keep-Alive Content-Length: 0 GET http://%HOSTIP:%HTTPPORT/1002.upload1 HTTP/1.1 Loading @@ -95,6 +96,7 @@ Host: %HOSTIP:%HTTPPORT Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1002.upload1", response="198aa9b6acb4b0c71d02a197a5e41f54" Content-Range: bytes 2-4/5 Accept: */* Proxy-Connection: Keep-Alive Content-Length: 3 Expect: 100-continue Loading @@ -105,6 +107,7 @@ Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", u Content-Range: bytes 2-4/5 User-Agent: curl/7.16.1 Accept: */* Proxy-Connection: Keep-Alive Content-Length: 3 Expect: 100-continue Loading tests/data/test1008 +2 −0 Original line number Diff line number Diff line Loading @@ -114,10 +114,12 @@ chkhostname curlhost CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1 Host: test.remote.example.com.1008:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= Proxy-Connection: Keep-Alive CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1 Host: test.remote.example.com.1008:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== Proxy-Connection: Keep-Alive GET /path/10080002 HTTP/1.1 User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4 Loading Loading
lib/http.c +6 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -2305,6 +2305,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) "%s" /* TE: */ "%s" /* accept-encoding */ "%s" /* referer */ "%s" /* Proxy-Connection */ "%s",/* transfer-encoding */ ftp_typecode, Loading @@ -2327,6 +2328,10 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) conn->allocptr.accept_encoding:"", (data->change.referer && conn->allocptr.ref)? conn->allocptr.ref:"" /* Referer: <data> */, (conn->bits.httpproxy && !conn->bits.tunnel_proxy && !Curl_checkProxyheaders(conn, "Proxy-Connection:"))? "Proxy-Connection: Keep-Alive\r\n":"", te ); Loading
lib/http_proxy.c +9 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -160,6 +160,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, if(!result) { char *host=(char *)""; const char *proxyconn=""; const char *useragent=""; const char *http = (conn->proxytype == CURLPROXY_HTTP_1_0) ? "1.0" : "1.1"; Loading @@ -185,6 +186,9 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, return CURLE_OUT_OF_MEMORY; } } if(!Curl_checkProxyheaders(conn, "Proxy-Connection:")) proxyconn = "Proxy-Connection: Keep-Alive\r\n"; if(!Curl_checkProxyheaders(conn, "User-Agent:") && data->set.str[STRING_USERAGENT]) useragent = conn->allocptr.uagent; Loading @@ -194,13 +198,15 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, "CONNECT %s HTTP/%s\r\n" "%s" /* Host: */ "%s" /* Proxy-Authorization */ "%s", /* User-Agent */ "%s" /* User-Agent */ "%s", /* Proxy-Connection */ hostheader, http, host, conn->allocptr.proxyuserpwd? conn->allocptr.proxyuserpwd:"", useragent); useragent, proxyconn); if(host && *host) free(host); Loading
tests/data/test1001 +2 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ Host: %HOSTIP:%HTTPPORT Content-Range: bytes 2-4/5 User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6 Accept: */* Proxy-Connection: Keep-Alive Content-Length: 0 GET http://%HOSTIP:%HTTPPORT/1001 HTTP/1.1 Loading @@ -96,6 +97,7 @@ Host: %HOSTIP:%HTTPPORT Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1001", response="6af4d89c952f4dd4cc215a6878dc499d" Content-Range: bytes 2-4/5 Accept: */* Proxy-Connection: Keep-Alive Content-Length: 3 Expect: 100-continue Loading
tests/data/test1002 +3 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ Host: %HOSTIP:%HTTPPORT Content-Range: bytes 2-4/5 User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6 Accept: */* Proxy-Connection: Keep-Alive Content-Length: 0 GET http://%HOSTIP:%HTTPPORT/1002.upload1 HTTP/1.1 Loading @@ -95,6 +96,7 @@ Host: %HOSTIP:%HTTPPORT Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/1002.upload1", response="198aa9b6acb4b0c71d02a197a5e41f54" Content-Range: bytes 2-4/5 Accept: */* Proxy-Connection: Keep-Alive Content-Length: 3 Expect: 100-continue Loading @@ -105,6 +107,7 @@ Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", u Content-Range: bytes 2-4/5 User-Agent: curl/7.16.1 Accept: */* Proxy-Connection: Keep-Alive Content-Length: 3 Expect: 100-continue Loading
tests/data/test1008 +2 −0 Original line number Diff line number Diff line Loading @@ -114,10 +114,12 @@ chkhostname curlhost CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1 Host: test.remote.example.com.1008:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= Proxy-Connection: Keep-Alive CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1 Host: test.remote.example.com.1008:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== Proxy-Connection: Keep-Alive GET /path/10080002 HTTP/1.1 User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4 Loading