- 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.
This commit is contained in:
Daniel Stenberg 2009-02-02 16:19:23 +00:00
parent dcf92bffd2
commit bdd4294e79
28 changed files with 86 additions and 44 deletions

View file

@ -102,12 +102,12 @@ http://test.remote.server.com:1008/path/10080002 --proxy http://%HOSTIP:%HTTPPOR
s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
</strippart>
<protocol>
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

View file

@ -111,16 +111,16 @@ http://test.remote.server.com:1021/path/10210002 --proxy http://%HOSTIP:%HTTPPOR
s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
</strippart>
<protocol>
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

View file

@ -49,7 +49,7 @@ ftp://test-number:1059/wanted/page -p -x %HOSTIP:%HTTPPORT
^User-Agent:.*
</strip>
<protocol>
CONNECT test-number:1059 HTTP/1.0
CONNECT test-number:1059 HTTP/1.1
Host: test-number:1059
Proxy-Connection: Keep-Alive

View file

@ -884,11 +884,11 @@ http://test.remote.server.com:1060/path/10600002 --proxy http://%HOSTIP:%HTTPPOR
^User-Agent: curl/.*
</strip>
<protocol>
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

View file

@ -889,11 +889,11 @@ http://test.remote.server.com:1061/path/10610002 --proxy http://%HOSTIP:%HTTPPOR
^User-Agent: curl/.*
</strip>
<protocol>
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

View file

@ -33,10 +33,10 @@ contents
http
</server>
<name>
HTTP CONNECT with proxytunnel and downgrade to HTTP/1.0
HTTP 1.0 CONNECT with proxytunnel and downgrade GET to HTTP/1.0
</name>
<command>
-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
</command>
</client>

View file

@ -81,11 +81,11 @@ http://test.remote.server.com:206/path/2060002 --proxy http://%HOSTIP:%HTTPPORT
^User-Agent: curl/.*
</strip>
<protocol>
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

View file

@ -95,12 +95,12 @@ http://test.remote.server.com:209/path/2090002 --proxy http://%HOSTIP:%HTTPPORT
s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
</strippart>
<protocol>
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

View file

@ -77,10 +77,10 @@ http
NTLM
</features>
<name>
HTTP proxy CONNECT auth NTLM and then POST
HTTP 1.0 proxy CONNECT auth NTLM and then POST
</name>
<command>
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"
</command>
</client>

View file

@ -42,7 +42,7 @@ http://test.remote.server.com:217/path/2170002 --proxy http://%HOSTIP:%HTTPPORT
^User-Agent: curl/.*
</strip>
<protocol>
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

View file

@ -98,12 +98,12 @@ http://test.remote.server.com:265/path/2650002 --proxy http://%HOSTIP:%HTTPPORT
s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
</strippart>
<protocol nonewline="yes">
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

View file

@ -57,7 +57,7 @@ http://remotesite.com/we/want/that/page/275 -p -x %HOSTIP:%HTTPPORT --user iam:m
^User-Agent:.*
</strip>
<protocol>
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

View file

@ -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"
<verify>
<protocol>
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

View file

@ -61,7 +61,7 @@ moo
# Verify data after the test has been "shot"
<verify>
<protocol>
CONNECT %HOSTIP:%HTTPSPORT HTTP/1.0
CONNECT %HOSTIP:%HTTPSPORT HTTP/1.1
Host: %HOSTIP:%HTTPSPORT
Proxy-Authorization: Basic dGVzdDppbmc=
Proxy-Connection: Keep-Alive

View file

@ -45,10 +45,10 @@ contents
http
</server>
<name>
HTTP CONNECT with proxytunnel and host Basic authentication
HTTP 1.0 CONNECT with proxytunnel and host Basic authentication
</name>
<command>
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
</command>
</client>

View file

@ -56,7 +56,7 @@ http://%HOSTIP:%HTTPPORT/we/want/that/page/83 -p -x %HOSTIP:%HTTPPORT --user iam
^User-Agent:.*
</strip>
<protocol>
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

View file

@ -31,10 +31,10 @@ http
SSL
</features>
<name>
HTTPS GET with failed proxy auth
HTTPS GET with failed proxy auth (CONNECT 1.0)
</name>
<command>
https://test.anything.really.com:94 -x %HOSTIP:%HTTPPORT
https://test.anything.really.com:94 --proxy1.0 %HOSTIP:%HTTPPORT
</command>
</client>

View file

@ -56,7 +56,7 @@ http://%HOSTIP:%HTTPPORT/we/want/that/page/95 -p -x %HOSTIP:%HTTPPORT -d "datato
^User-Agent:.*
</strip>
<protocol nonewline="yes">
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