From bdd4294e79eea15cb6f312f7ee7d388ad40a65e3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 2 Feb 2009 16:19:23 +0000 Subject: [PATCH] - Craig A West brought us: libcurl now defaults to do CONNECT with HTTP version 1.1 instead of 1.0 like before. This change also introduces the new proxy type for libcurl called 'CURLPROXY_HTTP_1_0' that then allows apps to switch (back) to CONNECT 1.0 requests. The curl tool also got a --proxy1.0 option that works exactly like --proxy but sets CURLPROXY_HTTP_1_0. I updated all test cases cases that use CONNECT and I tried to do some using --proxy1.0 and some updated to do CONNECT 1.1 to get both versions run. --- CHANGES | 10 ++++++++++ RELEASE-NOTES | 3 ++- docs/MANUAL | 3 +++ docs/curl.1 | 7 +++++++ docs/libcurl/curl_easy_setopt.3 | 8 ++++---- include/curl/curl.h | 5 ++++- lib/ftp.c | 1 + lib/http.c | 8 +++++--- lib/url.c | 14 +++++++++----- src/main.c | 11 +++++++++++ tests/data/test1008 | 4 ++-- tests/data/test1021 | 6 +++--- tests/data/test1059 | 2 +- tests/data/test1060 | 4 ++-- tests/data/test1061 | 4 ++-- tests/data/test1078 | 4 ++-- tests/data/test206 | 4 ++-- tests/data/test209 | 4 ++-- tests/data/test213 | 4 ++-- tests/data/test217 | 2 +- tests/data/test265 | 4 ++-- tests/data/test275 | 2 +- tests/data/test287 | 2 +- tests/data/test503 | 2 +- tests/data/test80 | 4 ++-- tests/data/test83 | 2 +- tests/data/test94 | 4 ++-- tests/data/test95 | 2 +- 28 files changed, 86 insertions(+), 44 deletions(-) diff --git a/CHANGES b/CHANGES index 8ef4e55bb..2dff16a7e 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,16 @@ Changelog +Daniel Stenberg (2 Feb 2009) +- Craig A West brought us: libcurl now defaults to do CONNECT with HTTP + version 1.1 instead of 1.0 like before. This change also introduces the new + proxy type for libcurl called 'CURLPROXY_HTTP_1_0' that then allows apps to + switch (back) to CONNECT 1.0 requests. The curl tool also got a --proxy1.0 + option that works exactly like --proxy but sets CURLPROXY_HTTP_1_0. + + I updated all test cases cases that use CONNECT and I tried to do some using + --proxy1.0 and some updated to do CONNECT 1.1 to get both versions run. + Daniel Stenberg (31 Jan 2009) - When building with c-ares 1.6.1 (not yet released) or later and IPv6 support enabled, we can now take advantage of its brand new AF_UNSPEC support in diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a2ecac09a..9cd40916f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -1,7 +1,7 @@ Curl and libcurl 7.19.4 Public curl releases: 110 - Command line options: 131 + Command line options: 132 curl_easy_setopt() options: 161 Public functions in libcurl: 58 Known libcurl bindings: 37 @@ -17,6 +17,7 @@ This release includes the following changes: the corresponding curl options --socks5-gssapi-service and --socks5-gssapi-nec o Improved IPv6 support when built with with c-ares >= 1.6.1 + o Added CURLPROXY_HTTP_1_0 and --proxy1.0 This release includes the following bugfixes: diff --git a/docs/MANUAL b/docs/MANUAL index de2bdd280..417befb37 100644 --- a/docs/MANUAL +++ b/docs/MANUAL @@ -141,6 +141,9 @@ PROXY curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/ + If the proxy is specified with --proxy1.0 instead of --proxy or -x, then + curl will use HTTP/1.0 instead of HTTP/1.1 for any CONNECT attempts. + curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5. See also the environment variables Curl support that offer further proxy diff --git a/docs/curl.1 b/docs/curl.1 index c7bc972b6..6eef693b1 100644 --- a/docs/curl.1 +++ b/docs/curl.1 @@ -903,6 +903,13 @@ with a remote host. (Added in 7.17.1) .IP "--proxy-ntlm" Tells curl to use HTTP NTLM authentication when communicating with the given proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host. +.IP "--proxy1.0 " +Use the specified HTTP 1.0 proxy. If the port number is not specified, it is +assumed at port 1080. + +The only difference between this and the HTTP proxy option (\fI-x/--proxy\fP), +is that attempts to use CONNECT through the proxy will specify an HTTP 1.0 +protocol instead of the default HTTP 1.1. .IP "-p/--proxytunnel" When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP protocols to attempt to tunnel through the proxy instead of merely using it to diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3 index c6e6013b5..579016bb7 100644 --- a/docs/libcurl/curl_easy_setopt.3 +++ b/docs/libcurl/curl_easy_setopt.3 @@ -470,10 +470,10 @@ Pass a long with this option to set the proxy port to connect to unless it is specified in the proxy string \fICURLOPT_PROXY\fP. .IP CURLOPT_PROXYTYPE Pass a long with this option to set type of the proxy. Available options for -this are \fICURLPROXY_HTTP\fP, \fICURLPROXY_SOCKS4\fP (added in 7.15.2), -\fICURLPROXY_SOCKS5\fP, \fICURLPROXY_SOCKS4A\fP (added in 7.18.0) and -\fICURLPROXY_SOCKS5_HOSTNAME\fP (added in 7.18.0). The HTTP type is -default. (Added in 7.10) +this are \fICURLPROXY_HTTP\fP, \fICURLPROXY_HTTP_1_0\fP (added in 7.19.4), +\fICURLPROXY_SOCKS4\fP (added in 7.15.2), \fICURLPROXY_SOCKS5\fP, +\fICURLPROXY_SOCKS4A\fP (added in 7.18.0) and \fICURLPROXY_SOCKS5_HOSTNAME\fP +(added in 7.18.0). The HTTP type is default. (Added in 7.10) .IP CURLOPT_NOPROXY Pass a pointer to a zero terminated string. The should be a comma- separated list of hosts which do not use a proxy, if one is specified. The only diff --git a/include/curl/curl.h b/include/curl/curl.h index 005a613f0..71283c0ed 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -459,7 +459,10 @@ typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ void *userptr); typedef enum { - CURLPROXY_HTTP = 0, /* added in 7.10 */ + CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use + CONNECT HTTP/1.1 */ + CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT + HTTP/1.0 */ CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already in 7.10 */ CURLPROXY_SOCKS5 = 5, /* added in 7.10 */ diff --git a/lib/ftp.c b/lib/ftp.c index 0723abe7e..3cc259d69 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -1894,6 +1894,7 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn, break; #endif /* CURL_DISABLE_PROXY */ case CURLPROXY_HTTP: + case CURLPROXY_HTTP_1_0: /* do nothing here. handled later. */ break; default: diff --git a/lib/http.c b/lib/http.c index b96d51d78..dc5066f8a 100644 --- a/lib/http.c +++ b/lib/http.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -1343,6 +1343,8 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, char *host=(char *)""; const char *proxyconn=""; const char *useragent=""; + const char *http = (conn->proxytype == CURLPROXY_HTTP_1_0) ? + "1.0" : "1.1"; if(!checkheaders(data, "Host:")) { host = aprintf("Host: %s\r\n", host_port); @@ -1363,12 +1365,12 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, /* BLOCKING */ result = add_bufferf(req_buffer, - "CONNECT %s:%d HTTP/1.0\r\n" + "CONNECT %s:%d HTTP/%s\r\n" "%s" /* Host: */ "%s" /* Proxy-Authorization */ "%s" /* User-Agent */ "%s", /* Proxy-Connection */ - hostname, remote_port, + hostname, remote_port, http, host, conn->allocptr.proxyuserpwd? conn->allocptr.proxyuserpwd:"", diff --git a/lib/url.c b/lib/url.c index bd9a7e690..7cbe3cec0 100644 --- a/lib/url.c +++ b/lib/url.c @@ -1453,7 +1453,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, case CURLOPT_PROXYTYPE: /* - * Set proxy type. HTTP/SOCKS4/SOCKS4a/SOCKS5/SOCKS5_HOSTNAME + * Set proxy type. HTTP/HTTP_1_0/SOCKS4/SOCKS4a/SOCKS5/SOCKS5_HOSTNAME */ data->set.proxytype = (curl_proxytype)va_arg(param, long); break; @@ -2857,6 +2857,7 @@ static CURLcode ConnectPlease(struct SessionHandle *data, break; #endif /* CURL_DISABLE_PROXY */ case CURLPROXY_HTTP: + case CURLPROXY_HTTP_1_0: /* do nothing here. handled later. */ break; default: @@ -4214,9 +4215,11 @@ static CURLcode create_conn(struct SessionHandle *data, conn->bits.proxy = (bool)(data->set.str[STRING_PROXY] && *data->set.str[STRING_PROXY]); - conn->bits.httpproxy = (bool)(conn->bits.proxy - && (conn->proxytype == CURLPROXY_HTTP)); - conn->bits.proxy_user_passwd = (bool)(NULL != data->set.str[STRING_PROXYUSERNAME]); + conn->bits.httpproxy = (bool)(conn->bits.proxy && + (conn->proxytype == CURLPROXY_HTTP || + conn->proxytype == CURLPROXY_HTTP_1_0)); + conn->bits.proxy_user_passwd = + (bool)(NULL != data->set.str[STRING_PROXYUSERNAME]); conn->bits.tunnel_proxy = data->set.tunnel_thru_httpproxy; #endif /* CURL_DISABLE_PROXY */ @@ -4315,7 +4318,8 @@ static CURLcode create_conn(struct SessionHandle *data, if(proxy && *proxy) { long bits = conn->protocol & (PROT_HTTPS|PROT_SSL|PROT_MISSING); - if(conn->proxytype == CURLPROXY_HTTP) { + if((conn->proxytype == CURLPROXY_HTTP) || + (conn->proxytype == CURLPROXY_HTTP_1_0)) { /* force this connection's protocol to become HTTP */ conn->protocol = PROT_HTTP | bits; conn->bits.httpproxy = TRUE; diff --git a/src/main.c b/src/main.c index 17fc415ff..db2a1307b 100644 --- a/src/main.c +++ b/src/main.c @@ -448,6 +448,7 @@ struct Configurable { char *userpwd; char *proxyuserpwd; char *proxy; + int proxyver; /* set to CURLPROXY_HTTP* define */ char *noproxy; bool proxytunnel; bool ftp_append; /* APPE on ftp */ @@ -791,6 +792,7 @@ static void help(void) " --proxy-negotiate Use Negotiate authentication on the proxy (H)", " --proxy-ntlm Use NTLM authentication on the proxy (H)", " -U/--proxy-user Set proxy user and password", + " --proxy1.0 Use HTTP/1.0 proxy on given port", " -p/--proxytunnel Operate through a HTTP proxy tunnel (using CONNECT)", " --pubkey Public key file name (SSH)", " -Q/--quote Send command(s) to server before file transfer (F/SFTP)", @@ -1681,6 +1683,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ {"$6", "socks5-gssapi-service", TRUE}, {"$7", "socks5-gssapi-nec", FALSE}, #endif + {"$8", "proxy1.0", TRUE}, {"0", "http1.0", FALSE}, {"1", "tlsv1", FALSE}, @@ -2202,6 +2205,11 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ config->socks5_gssapi_nec = TRUE; break; #endif + case '8': /* --proxy1.0 */ + /* http 1.0 proxy */ + GetStr(&config->proxy, nextarg); + config->proxyver = CURLPROXY_HTTP_1_0; + break; } break; case '#': /* --progress-bar */ @@ -2887,6 +2895,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ case 'x': /* proxy */ GetStr(&config->proxy, nextarg); + config->proxyver = CURLPROXY_HTTP; break; case 'X': /* set custom request */ @@ -4567,6 +4576,8 @@ operate(struct Configurable *config, int argc, argv_item_t argv[]) my_setopt(curl, CURLOPT_INFILESIZE_LARGE, uploadfilesize); my_setopt(curl, CURLOPT_URL, url); /* what to fetch */ my_setopt(curl, CURLOPT_PROXY, config->proxy); /* proxy to use */ + if(config->proxy) + my_setopt(curl, CURLOPT_PROXYTYPE, config->proxyver); my_setopt(curl, CURLOPT_NOPROGRESS, config->noprogress); if(config->no_body) { my_setopt(curl, CURLOPT_NOBODY, 1); diff --git a/tests/data/test1008 b/tests/data/test1008 index 88afa7a9e..ce79dfe67 100644 --- a/tests/data/test1008 +++ b/tests/data/test1008 @@ -102,12 +102,12 @@ http://test.remote.server.com:1008/path/10080002 --proxy http://%HOSTIP:%HTTPPOR s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/ -CONNECT test.remote.server.com:1008 HTTP/1.0 +CONNECT test.remote.server.com:1008 HTTP/1.1 Host: test.remote.server.com:1008 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= Proxy-Connection: Keep-Alive -CONNECT test.remote.server.com:1008 HTTP/1.0 +CONNECT test.remote.server.com:1008 HTTP/1.1 Host: test.remote.server.com:1008 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA Proxy-Connection: Keep-Alive diff --git a/tests/data/test1021 b/tests/data/test1021 index 868714769..e08aad19d 100644 --- a/tests/data/test1021 +++ b/tests/data/test1021 @@ -111,16 +111,16 @@ http://test.remote.server.com:1021/path/10210002 --proxy http://%HOSTIP:%HTTPPOR s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/ -CONNECT test.remote.server.com:1021 HTTP/1.0 +CONNECT test.remote.server.com:1021 HTTP/1.1 Host: test.remote.server.com:1021 Proxy-Connection: Keep-Alive -CONNECT test.remote.server.com:1021 HTTP/1.0 +CONNECT test.remote.server.com:1021 HTTP/1.1 Host: test.remote.server.com:1021 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= Proxy-Connection: Keep-Alive -CONNECT test.remote.server.com:1021 HTTP/1.0 +CONNECT test.remote.server.com:1021 HTTP/1.1 Host: test.remote.server.com:1021 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA Proxy-Connection: Keep-Alive diff --git a/tests/data/test1059 b/tests/data/test1059 index 89caf9c4f..5a96de61a 100644 --- a/tests/data/test1059 +++ b/tests/data/test1059 @@ -49,7 +49,7 @@ ftp://test-number:1059/wanted/page -p -x %HOSTIP:%HTTPPORT ^User-Agent:.* -CONNECT test-number:1059 HTTP/1.0 +CONNECT test-number:1059 HTTP/1.1 Host: test-number:1059 Proxy-Connection: Keep-Alive diff --git a/tests/data/test1060 b/tests/data/test1060 index 8b2092271..3e0c77661 100644 --- a/tests/data/test1060 +++ b/tests/data/test1060 @@ -884,11 +884,11 @@ http://test.remote.server.com:1060/path/10600002 --proxy http://%HOSTIP:%HTTPPOR ^User-Agent: curl/.* -CONNECT test.remote.server.com:1060 HTTP/1.0 +CONNECT test.remote.server.com:1060 HTTP/1.1 Host: test.remote.server.com:1060 Proxy-Connection: Keep-Alive -CONNECT test.remote.server.com:1060 HTTP/1.0 +CONNECT test.remote.server.com:1060 HTTP/1.1 Host: test.remote.server.com:1060 Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.server.com:1060", response="b527d164630481e2cc48c04d18ed2212" Proxy-Connection: Keep-Alive diff --git a/tests/data/test1061 b/tests/data/test1061 index 29c3aa622..59c14faad 100644 --- a/tests/data/test1061 +++ b/tests/data/test1061 @@ -889,11 +889,11 @@ http://test.remote.server.com:1061/path/10610002 --proxy http://%HOSTIP:%HTTPPOR ^User-Agent: curl/.* -CONNECT test.remote.server.com:1061 HTTP/1.0 +CONNECT test.remote.server.com:1061 HTTP/1.1 Host: test.remote.server.com:1061 Proxy-Connection: Keep-Alive -CONNECT test.remote.server.com:1061 HTTP/1.0 +CONNECT test.remote.server.com:1061 HTTP/1.1 Host: test.remote.server.com:1061 Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.server.com:1061", response="244a8caab5f343a1a20d2425e4d6e951" Proxy-Connection: Keep-Alive diff --git a/tests/data/test1078 b/tests/data/test1078 index 2ff4543d9..e2355e3ae 100644 --- a/tests/data/test1078 +++ b/tests/data/test1078 @@ -33,10 +33,10 @@ contents http -HTTP CONNECT with proxytunnel and downgrade to HTTP/1.0 +HTTP 1.0 CONNECT with proxytunnel and downgrade GET to HTTP/1.0 --x %HOSTIP:%HTTPPORT -p http://%HOSTIP:%HTTPPORT/we/want/that/page/1078 http://%HOSTIP:%HTTPPORT/we/want/that/page/1078 +--proxy1.0 %HOSTIP:%HTTPPORT -p http://%HOSTIP:%HTTPPORT/we/want/that/page/1078 http://%HOSTIP:%HTTPPORT/we/want/that/page/1078 diff --git a/tests/data/test206 b/tests/data/test206 index dbe95e9a1..3d7c429cd 100644 --- a/tests/data/test206 +++ b/tests/data/test206 @@ -81,11 +81,11 @@ http://test.remote.server.com:206/path/2060002 --proxy http://%HOSTIP:%HTTPPORT ^User-Agent: curl/.* -CONNECT test.remote.server.com:206 HTTP/1.0 +CONNECT test.remote.server.com:206 HTTP/1.1 Host: test.remote.server.com:206 Proxy-Connection: Keep-Alive -CONNECT test.remote.server.com:206 HTTP/1.0 +CONNECT test.remote.server.com:206 HTTP/1.1 Host: test.remote.server.com:206 Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.server.com:206", response="5059a96c954981ceb94e17d667c8d3f8" Proxy-Connection: Keep-Alive diff --git a/tests/data/test209 b/tests/data/test209 index 411c32c6d..e922e789d 100644 --- a/tests/data/test209 +++ b/tests/data/test209 @@ -95,12 +95,12 @@ http://test.remote.server.com:209/path/2090002 --proxy http://%HOSTIP:%HTTPPORT s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/ -CONNECT test.remote.server.com:209 HTTP/1.0 +CONNECT test.remote.server.com:209 HTTP/1.1 Host: test.remote.server.com:209 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= Proxy-Connection: Keep-Alive -CONNECT test.remote.server.com:209 HTTP/1.0 +CONNECT test.remote.server.com:209 HTTP/1.1 Host: test.remote.server.com:209 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA Proxy-Connection: Keep-Alive diff --git a/tests/data/test213 b/tests/data/test213 index cc9ac4160..776609462 100644 --- a/tests/data/test213 +++ b/tests/data/test213 @@ -77,10 +77,10 @@ http NTLM -HTTP proxy CONNECT auth NTLM and then POST +HTTP 1.0 proxy CONNECT auth NTLM and then POST -http://test.remote.server.com:213/path/2130002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit" +http://test.remote.server.com:213/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit" diff --git a/tests/data/test217 b/tests/data/test217 index 9d86ced23..13fb54381 100644 --- a/tests/data/test217 +++ b/tests/data/test217 @@ -42,7 +42,7 @@ http://test.remote.server.com:217/path/2170002 --proxy http://%HOSTIP:%HTTPPORT ^User-Agent: curl/.* -CONNECT test.remote.server.com:217 HTTP/1.0 +CONNECT test.remote.server.com:217 HTTP/1.1 Host: test.remote.server.com:217 Proxy-Connection: Keep-Alive diff --git a/tests/data/test265 b/tests/data/test265 index 0bf962ee9..65db93d63 100644 --- a/tests/data/test265 +++ b/tests/data/test265 @@ -98,12 +98,12 @@ http://test.remote.server.com:265/path/2650002 --proxy http://%HOSTIP:%HTTPPORT s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/ -CONNECT test.remote.server.com:265 HTTP/1.0 +CONNECT test.remote.server.com:265 HTTP/1.1 Host: test.remote.server.com:265 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= Proxy-Connection: Keep-Alive -CONNECT test.remote.server.com:265 HTTP/1.0 +CONNECT test.remote.server.com:265 HTTP/1.1 Host: test.remote.server.com:265 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA Proxy-Connection: Keep-Alive diff --git a/tests/data/test275 b/tests/data/test275 index 17bdfc1cb..145c163b3 100644 --- a/tests/data/test275 +++ b/tests/data/test275 @@ -57,7 +57,7 @@ http://remotesite.com/we/want/that/page/275 -p -x %HOSTIP:%HTTPPORT --user iam:m ^User-Agent:.* -CONNECT remotesite.com:80 HTTP/1.0 +CONNECT remotesite.com:80 HTTP/1.1 Host: remotesite.com:80 Proxy-Authorization: Basic eW91YXJlOnlvdXJzZWxm User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3 diff --git a/tests/data/test287 b/tests/data/test287 index 507387884..56c1b23dc 100644 --- a/tests/data/test287 +++ b/tests/data/test287 @@ -36,7 +36,7 @@ http://test.remote.server.com:287/path/287 -H "User-Agent: looser/2007" --proxy # Verify data after the test has been "shot" -CONNECT test.remote.server.com:287 HTTP/1.0 +CONNECT test.remote.server.com:287 HTTP/1.1 Host: test.remote.server.com:287 Proxy-Connection: Keep-Alive User-Agent: looser/2007 diff --git a/tests/data/test503 b/tests/data/test503 index f8bb27c03..3f29d8f6e 100644 --- a/tests/data/test503 +++ b/tests/data/test503 @@ -61,7 +61,7 @@ moo # Verify data after the test has been "shot" -CONNECT %HOSTIP:%HTTPSPORT HTTP/1.0 +CONNECT %HOSTIP:%HTTPSPORT HTTP/1.1 Host: %HOSTIP:%HTTPSPORT Proxy-Authorization: Basic dGVzdDppbmc= Proxy-Connection: Keep-Alive diff --git a/tests/data/test80 b/tests/data/test80 index dded9681a..a405af7a1 100644 --- a/tests/data/test80 +++ b/tests/data/test80 @@ -45,10 +45,10 @@ contents http -HTTP CONNECT with proxytunnel and host Basic authentication +HTTP 1.0 CONNECT with proxytunnel and host Basic authentication -http://%HOSTIP:%HTTPPORT/we/want/that/page/80 -p -x %HOSTIP:%HTTPPORT --user iam:myself --proxy-user youare:yourself +http://%HOSTIP:%HTTPPORT/we/want/that/page/80 -p --proxy1.0 %HOSTIP:%HTTPPORT --user iam:myself --proxy-user youare:yourself diff --git a/tests/data/test83 b/tests/data/test83 index 5482b60c9..0ada5d1af 100644 --- a/tests/data/test83 +++ b/tests/data/test83 @@ -56,7 +56,7 @@ http://%HOSTIP:%HTTPPORT/we/want/that/page/83 -p -x %HOSTIP:%HTTPPORT --user iam ^User-Agent:.* -CONNECT %HOSTIP:%HTTPPORT HTTP/1.0 +CONNECT %HOSTIP:%HTTPPORT HTTP/1.1 User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3 Host: %HOSTIP:%HTTPPORT Proxy-Connection: Keep-Alive diff --git a/tests/data/test94 b/tests/data/test94 index 9b6a5f6eb..a7bafa695 100644 --- a/tests/data/test94 +++ b/tests/data/test94 @@ -31,10 +31,10 @@ http SSL -HTTPS GET with failed proxy auth +HTTPS GET with failed proxy auth (CONNECT 1.0) -https://test.anything.really.com:94 -x %HOSTIP:%HTTPPORT +https://test.anything.really.com:94 --proxy1.0 %HOSTIP:%HTTPPORT diff --git a/tests/data/test95 b/tests/data/test95 index 2fa1896cb..9fea1bec1 100644 --- a/tests/data/test95 +++ b/tests/data/test95 @@ -56,7 +56,7 @@ http://%HOSTIP:%HTTPPORT/we/want/that/page/95 -p -x %HOSTIP:%HTTPPORT -d "datato ^User-Agent:.* -CONNECT %HOSTIP:%HTTPPORT HTTP/1.0 +CONNECT %HOSTIP:%HTTPPORT HTTP/1.1 User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3 Host: %HOSTIP:%HTTPPORT Proxy-Connection: Keep-Alive