From 1e29d275c643ef6aab7948f0f55a7a9397e56b42 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 15 Mar 2013 17:28:32 +0100 Subject: test1509: verify proxy header response headers count Modified sws to support and use custom CONNECT responses instead of the previously naive hard-coded version. Made the HTTP test server able to extract test case number from the host name in a CONNECT request by finding the number after the last dot. It makes 'machine.moo.123' use test case 123. Adapted a larger amount of tests to the new style. Bug: http://curl.haxx.se/bug/view.cgi?id=1204 Reported by: Martin Jansen --- tests/data/Makefile.am | 2 +- tests/data/test1008 | 20 ++++++------ tests/data/test1021 | 28 ++++++++-------- tests/data/test1059 | 4 +-- tests/data/test1060 | 22 ++++++------- tests/data/test1061 | 22 ++++++------- tests/data/test1078 | 17 +++++++--- tests/data/test1097 | 14 ++++---- tests/data/test1316 | 16 ++++++++- tests/data/test1319 | 14 ++++++-- tests/data/test1320 | 11 +++++-- tests/data/test1321 | 12 +++++-- tests/data/test1509 | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test206 | 24 +++++++------- tests/data/test209 | 20 ++++++------ tests/data/test213 | 20 ++++++------ tests/data/test217 | 10 +++--- tests/data/test265 | 20 ++++++------ tests/data/test275 | 19 +++++++---- tests/data/test287 | 11 +++---- tests/data/test302 | 13 +++++++- tests/data/test503 | 12 ++++--- tests/data/test80 | 12 ++++--- tests/data/test83 | 12 ++++--- tests/data/test94 | 4 +-- tests/data/test95 | 12 ++++--- 26 files changed, 312 insertions(+), 147 deletions(-) create mode 100644 tests/data/test1509 (limited to 'tests/data') diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index a377c0ddd..3d7b04e1d 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -109,7 +109,7 @@ test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \ test1408 test1409 test1410 test1411 test1412 test1413 \ \ test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \ -test1508 \ +test1508 test1509 \ \ test1900 test1901 test1902 test1903 \ \ diff --git a/tests/data/test1008 b/tests/data/test1008 index e576e7197..30714f9af 100644 --- a/tests/data/test1008 +++ b/tests/data/test1008 @@ -16,7 +16,7 @@ connection-monitor # this is returned first since we get no proxy-auth - + HTTP/1.1 407 Authorization Required to proxy me my dear Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== Transfer-Encoding: chunked @@ -27,16 +27,16 @@ FA0 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX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XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 0 - + # This is supposed to be returned when the server gets the second # Authorization: NTLM line passed-in from the client - + HTTP/1.1 200 Things are fine in proxy land Server: Microsoft-IIS/5.0 Content-Type: text/html; charset=iso-8859-1 - + # this is returned when we get a GET! @@ -96,7 +96,7 @@ CURL_GETHOSTNAME=curlhost LD_PRELOAD=%PWD/libtest/.libs/libhostname.so -http://test.remote.example.com:1008/path/10080002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel +http://test.remote.example.com.1008:%HTTPPORT/path/10080002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel chkhostname curlhost @@ -109,19 +109,19 @@ chkhostname curlhost ^User-Agent: curl/.* -CONNECT test.remote.example.com:1008 HTTP/1.1 -Host: test.remote.example.com:1008 +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 HTTP/1.1 -Host: test.remote.example.com:1008 +CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1 +Host: test.remote.example.com.1008:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q= 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 -Host: test.remote.example.com:1008 +Host: test.remote.example.com.1008:%HTTPPORT Accept: */* [DISCONNECT] diff --git a/tests/data/test1021 b/tests/data/test1021 index 1979f7507..81127249a 100644 --- a/tests/data/test1021 +++ b/tests/data/test1021 @@ -12,32 +12,32 @@ HTTP proxy NTLM auth # Server-side - + HTTP/1.1 407 Authorization Required to proxy me my dear swsclose Proxy-Authenticate: NTLM Content-Length: 21 Connection: close data to discard - + # this is returned first since we get no proxy-auth - + HTTP/1.1 407 Authorization Required to proxy me my dear Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== Content-Length: 28 And you should ignore this data. - + # This is supposed to be returned when the server gets the second # Authorization: NTLM line passed-in from the client - + HTTP/1.1 200 Things are fine in proxy land Server: Microsoft-IIS/5.0 Content-Type: text/html; charset=iso-8859-1 - + # this is returned when we get a GET! @@ -102,7 +102,7 @@ CURL_GETHOSTNAME=curlhost LD_PRELOAD=%PWD/libtest/.libs/libhostname.so -http://test.remote.example.com:1021/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth --proxytunnel +http://test.remote.example.com.1021:%HTTPPORT/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth --proxytunnel chkhostname curlhost @@ -115,23 +115,23 @@ chkhostname curlhost ^User-Agent: curl/.* -CONNECT test.remote.example.com:1021 HTTP/1.1 -Host: test.remote.example.com:1021 +CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1 +Host: test.remote.example.com.1021:%HTTPPORT Proxy-Connection: Keep-Alive -CONNECT test.remote.example.com:1021 HTTP/1.1 -Host: test.remote.example.com:1021 +CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1 +Host: test.remote.example.com.1021:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= Proxy-Connection: Keep-Alive -CONNECT test.remote.example.com:1021 HTTP/1.1 -Host: test.remote.example.com:1021 +CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1 +Host: test.remote.example.com.1021:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q= Proxy-Connection: Keep-Alive GET /path/10210002 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 -Host: test.remote.example.com:1021 +Host: test.remote.example.com.1021:%HTTPPORT Accept: */* diff --git a/tests/data/test1059 b/tests/data/test1059 index 5a96de61a..6820ea679 100644 --- a/tests/data/test1059 +++ b/tests/data/test1059 @@ -12,13 +12,13 @@ FAILURE # # Server-side - + HTTP/1.1 501 Method not implemented swsclose Date: Thu, 09 Nov 2010 14:49:00 GMT Connection: close Content-Length: 0 - + # diff --git a/tests/data/test1060 b/tests/data/test1060 index 767a7ccc9..da1be78b7 100644 --- a/tests/data/test1060 +++ b/tests/data/test1060 @@ -14,7 +14,7 @@ HTTP proxy Digest auth # this is returned first since we get no proxy-auth - + HTTP/1.1 407 Authorization Required to proxy me my dear Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345" Content-Length: 40000 @@ -820,7 +820,7 @@ And you should ignore this data. aaaaaaaaaaaaaaaa And you should ignore this data. aaaaaaaaaaaaaaaa And you should ignore this data. aaaaaaaaaaaaaaaa end of 1 KB aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - + # this is returned when we get a GET! @@ -835,12 +835,12 @@ daniel # then this is returned when we get proxy-auth - + HTTP/1.1 200 OK swsbounce Server: no Nice proxy auth sir! - + HTTP/1.1 407 Authorization Required to proxy me my dear @@ -874,7 +874,7 @@ crypto HTTP proxy CONNECT auth Digest, large headers and data -http://test.remote.haxx.se:1060/path/10600002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel +http://test.remote.haxx.se.1060:%HTTPPORT/path/10600002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel @@ -884,17 +884,17 @@ http://test.remote.haxx.se:1060/path/10600002 --proxy http://%HOSTIP:%HTTPPORT - ^User-Agent: curl/.* -CONNECT test.remote.haxx.se:1060 HTTP/1.1 -Host: test.remote.haxx.se:1060 +CONNECT test.remote.haxx.se.1060:%HTTPPORT HTTP/1.1 +Host: test.remote.haxx.se.1060:%HTTPPORT Proxy-Connection: Keep-Alive -CONNECT test.remote.haxx.se:1060 HTTP/1.1 -Host: test.remote.haxx.se:1060 -Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se:1060", response="79e394ffcd42b6c771c7582da1fc4498" +CONNECT test.remote.haxx.se.1060:%HTTPPORT HTTP/1.1 +Host: test.remote.haxx.se.1060:%HTTPPORT +Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.1060:%HTTPPORT", response="e1fbed39c26f4efe284adc0e576ff638" Proxy-Connection: Keep-Alive GET /path/10600002 HTTP/1.1 -Host: test.remote.haxx.se:1060 +Host: test.remote.haxx.se.1060:%HTTPPORT Accept: */* diff --git a/tests/data/test1061 b/tests/data/test1061 index 0fb8c5110..05c3209c4 100644 --- a/tests/data/test1061 +++ b/tests/data/test1061 @@ -15,7 +15,7 @@ HTTP proxy Digest auth # this is returned first since we get no proxy-auth - + HTTP/1.1 407 Authorization Required to proxy me my dear Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345" Transfer-Encoding: chunked @@ -825,7 +825,7 @@ end of 1 KB aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 - + # this is returned when we get a GET! @@ -840,12 +840,12 @@ daniel # then this is returned when we get proxy-auth - + HTTP/1.1 200 OK swsbounce Server: no Nice proxy auth sir! - + HTTP/1.1 407 Authorization Required to proxy me my dear @@ -879,7 +879,7 @@ crypto HTTP proxy CONNECT auth Digest, large headers and chunked data -http://test.remote.haxx.se:1061/path/10610002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel +http://test.remote.haxx.se.1061:%HTTPPORT/path/10610002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel @@ -889,17 +889,17 @@ http://test.remote.haxx.se:1061/path/10610002 --proxy http://%HOSTIP:%HTTPPORT - ^User-Agent: curl/.* -CONNECT test.remote.haxx.se:1061 HTTP/1.1 -Host: test.remote.haxx.se:1061 +CONNECT test.remote.haxx.se.1061:%HTTPPORT HTTP/1.1 +Host: test.remote.haxx.se.1061:%HTTPPORT Proxy-Connection: Keep-Alive -CONNECT test.remote.haxx.se:1061 HTTP/1.1 -Host: test.remote.haxx.se:1061 -Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se:1061", response="8e96acf6a6214012183879e28e73b2d3" +CONNECT test.remote.haxx.se.1061:%HTTPPORT HTTP/1.1 +Host: test.remote.haxx.se.1061:%HTTPPORT +Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.1061:%HTTPPORT", response="4e23449fa93224834299e7282a70472c" Proxy-Connection: Keep-Alive GET /path/10610002 HTTP/1.1 -Host: test.remote.haxx.se:1061 +Host: test.remote.haxx.se.1061:%HTTPPORT Accept: */* diff --git a/tests/data/test1078 b/tests/data/test1078 index cacdf4dd4..a9bb771be 100644 --- a/tests/data/test1078 +++ b/tests/data/test1078 @@ -13,6 +13,12 @@ proxytunnel # # Server-side + +HTTP/1.1 200 Mighty fine indeed +Server: test tunnel 2000 + + + HTTP/1.0 200 OK Date: Thu, 09 Nov 2010 14:49:00 GMT @@ -37,7 +43,7 @@ http-proxy HTTP 1.0 CONNECT with proxytunnel and downgrade GET to HTTP/1.0 ---proxy1.0 %HOSTIP:%PROXYPORT -p http://%HOSTIP:%HTTPPORT/we/want/that/page/1078 http://%HOSTIP:%HTTPPORT/we/want/that/page/1078 +--proxy1.0 %HOSTIP:%PROXYPORT -p http://%HOSTIP.1078:%HTTPPORT/we/want/that/page/1078 http://%HOSTIP.1078:%HTTPPORT/we/want/that/page/1078 @@ -48,23 +54,24 @@ HTTP 1.0 CONNECT with proxytunnel and downgrade GET to HTTP/1.0 ^User-Agent:.* -CONNECT %HOSTIP:%HTTPPORT HTTP/1.0 -Host: %HOSTIP:%HTTPPORT +CONNECT %HOSTIP.1078:%HTTPPORT HTTP/1.0 +Host: %HOSTIP.1078:%HTTPPORT Proxy-Connection: Keep-Alive GET /we/want/that/page/1078 HTTP/1.1 -Host: %HOSTIP:%HTTPPORT +Host: %HOSTIP.1078:%HTTPPORT Accept: */* GET /we/want/that/page/1078 HTTP/1.0 -Host: %HOSTIP:%HTTPPORT +Host: %HOSTIP.1078:%HTTPPORT Accept: */* HTTP/1.1 200 Mighty fine indeed +Server: test tunnel 2000 HTTP/1.0 200 OK Date: Thu, 09 Nov 2010 14:49:00 GMT diff --git a/tests/data/test1097 b/tests/data/test1097 index ebb039962..b899810d0 100644 --- a/tests/data/test1097 +++ b/tests/data/test1097 @@ -18,13 +18,15 @@ Content-Length: 27 This is all fine and dandy - + + HTTP/1.1 200 We are fine and cool Server: Apache/1.3.27 (Dorw1n) PHP/44.1.2 Content-Length: 27 This is all fine and dandy - + + HTTP/1.1 200 We are fine and cool Server: Apache/1.3.27 (Dorw1n) PHP/44.1.2 @@ -50,7 +52,7 @@ NTLM HTTP POST using CONNECT with --proxy-ntlm but no auth is required -http://test.a.galaxy.far.far.away:1097/1097 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm -d "dummy=value" -p +http://test.a.galaxy.far.far.away.1097:%HTTPPORT/1097 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm -d "dummy=value" -p @@ -60,15 +62,15 @@ http://test.a.galaxy.far.far.away:1097/1097 --proxy http://%HOSTIP:%HTTPPORT --p ^User-Agent: curl/.* -CONNECT test.a.galaxy.far.far.away:1097 HTTP/1.1 -Host: test.a.galaxy.far.far.away:1097 +CONNECT test.a.galaxy.far.far.away.1097:%HTTPPORT HTTP/1.1 +Host: test.a.galaxy.far.far.away.1097:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= User-Agent: curl/7.19.5-CVS (i686-pc-linux-gnu) libcurl/7.19.5-CVS OpenSSL/0.9.8g zlib/1.2.3.3 c-ares/1.6.1-CVS libidn/1.12 libssh2/1.0.1_CVS Proxy-Connection: Keep-Alive POST /1097 HTTP/1.1 User-Agent: curl/7.19.5-CVS (i686-pc-linux-gnu) libcurl/7.19.5-CVS OpenSSL/0.9.8g zlib/1.2.3.3 c-ares/1.6.1-CVS libidn/1.12 libssh2/1.0.1_CVS -Host: test.a.galaxy.far.far.away:1097 +Host: test.a.galaxy.far.far.away.1097:%HTTPPORT Accept: */* Content-Length: 0 Content-Type: application/x-www-form-urlencoded diff --git a/tests/data/test1316 b/tests/data/test1316 index e65bd5f6a..51f58c268 100644 --- a/tests/data/test1316 +++ b/tests/data/test1316 @@ -12,12 +12,21 @@ HTTP proxy # # Server-side + + +HTTP/1.1 200 Mighty fine indeed +Magic: sure you can FTP me + + + # When doing LIST, we get the default list output hard-coded in the test # FTP server HTTP/1.1 200 Mighty fine indeed +Magic: sure you can FTP me HTTP/1.1 200 Mighty fine indeed +Magic: sure you can FTP me total 20 drwxr-xr-x 8 98 98 512 Oct 22 13:06 . @@ -36,6 +45,11 @@ dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr # # Client-side + +# please send the real CONNECT connect off to the FTP server's port + +%FTPPORT + ftp http-proxy @@ -44,7 +58,7 @@ http-proxy FTP LIST tunneled through HTTP proxy -ftp://%HOSTIP:%FTPPORT/ -p -x %HOSTIP:%PROXYPORT +ftp://ftp.1316:%FTPPORT/ -p -x %HOSTIP:%PROXYPORT diff --git a/tests/data/test1319 b/tests/data/test1319 index dc46a69a5..7818503bd 100644 --- a/tests/data/test1319 +++ b/tests/data/test1319 @@ -11,6 +11,13 @@ HTTP proxy # # Server-side + + +HTTP/1.1 200 Mighty fine indeed +pop3: sure hit me + + + # When doing LIST, we get the default list output hard-coded in the test # FTP server @@ -25,6 +32,7 @@ body HTTP/1.1 200 Mighty fine indeed +pop3: sure hit me From: me@somewhere To: fake@nowhere @@ -47,7 +55,7 @@ http-proxy POP3 fetch tunneled through HTTP proxy -pop3://%HOSTIP:%POP3PORT/1319 -p -x %HOSTIP:%PROXYPORT -u user:secret +pop3://pop.1319:%POP3PORT/1319 -p -x %HOSTIP:%PROXYPORT -u user:secret @@ -65,8 +73,8 @@ RETR 1319 QUIT -CONNECT %HOSTIP:%POP3PORT HTTP/1.1 -Host: %HOSTIP:%POP3PORT +CONNECT pop.1319:%POP3PORT HTTP/1.1 +Host: pop.1319:%POP3PORT User-Agent: curl/7.24.0-DEV (i686-pc-linux-gnu) libcurl/7.24.0-DEV OpenSSL/1.0.0e zlib/1.2.3.4 c-ares/1.7.6-DEV libidn/1.23 libssh2/1.4.0_DEV librtmp/2.2e Proxy-Connection: Keep-Alive diff --git a/tests/data/test1320 b/tests/data/test1320 index f7af40aa1..7ccf67246 100644 --- a/tests/data/test1320 +++ b/tests/data/test1320 @@ -11,6 +11,11 @@ HTTP proxy # # Server-side + +HTTP/1.1 200 Mighty fine indeed +smtp: sure hit me + + # @@ -30,7 +35,7 @@ To: another body -smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 1320@foo --mail-rcpt 1320@foobar.example --mail-from 1320@from -T - -p -x %HOSTIP:%PROXYPORT +smtp://smtp.1320:%SMTPPORT/user --mail-rcpt 1320@foo --mail-rcpt 1320@foobar.example --mail-from 1320@from -T - -p -x %HOSTIP:%PROXYPORT @@ -57,8 +62,8 @@ body . -CONNECT %HOSTIP:%SMTPPORT HTTP/1.1 -Host: %HOSTIP:%SMTPPORT +CONNECT smtp.1320:%SMTPPORT HTTP/1.1 +Host: smtp.1320:%SMTPPORT User-Agent: curl/7.24.0-DEV (i686-pc-linux-gnu) libcurl/7.24.0-DEV OpenSSL/1.0.0e zlib/1.2.3.4 c-ares/1.7.6-DEV libidn/1.23 libssh2/1.4.0_DEV librtmp/2.2e Proxy-Connection: Keep-Alive diff --git a/tests/data/test1321 b/tests/data/test1321 index 74f5a1d99..bfa31e00c 100644 --- a/tests/data/test1321 +++ b/tests/data/test1321 @@ -12,6 +12,11 @@ HTTP proxy # # Server-side + +HTTP/1.1 200 Mighty fine indeed +imap: sure hit me + + From: me@somewhere To: fake@nowhere @@ -23,6 +28,7 @@ body HTTP/1.1 200 Mighty fine indeed +imap: sure hit me From: me@somewhere To: fake@nowhere @@ -45,7 +51,7 @@ http-proxy IMAP FETCH tunneled through HTTP proxy -'imap://%HOSTIP:%IMAPPORT/1321/;UID=1' -u user:secret -p -x %HOSTIP:%PROXYPORT +'imap://imap.1321:%IMAPPORT/1321/;UID=1' -u user:secret -p -x %HOSTIP:%PROXYPORT @@ -63,8 +69,8 @@ A004 FETCH 1 BODY[] A005 LOGOUT -CONNECT %HOSTIP:%IMAPPORT HTTP/1.1 -Host: %HOSTIP:%IMAPPORT +CONNECT imap.1321:%IMAPPORT HTTP/1.1 +Host: imap.1321:%IMAPPORT User-Agent: curl/7.24.0-DEV (i686-pc-linux-gnu) libcurl/7.24.0-DEV OpenSSL/1.0.0e zlib/1.2.3.4 c-ares/1.7.6-DEV libidn/1.23 libssh2/1.4.0_DEV librtmp/2.2e Proxy-Connection: Keep-Alive diff --git a/tests/data/test1509 b/tests/data/test1509 new file mode 100644 index 000000000..dd68b05d1 --- /dev/null +++ b/tests/data/test1509 @@ -0,0 +1,88 @@ + + + +HTTP +HTTP GET +HTTP CONNECT +HTTP proxy +proxytunnel + + + +# Server-side + + +connection-monitor + + +HTTP/1.1 200 Mighty fine indeed +Server: the beast that eats naughty clients + + + + +HTTP/1.1 200 OK swsclose +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT +ETag: "21025-dc7-39462498" + + + +HTTP/1.1 200 Mighty fine indeed +Server: the beast that eats naughty clients + +HTTP/1.1 200 OK swsclose +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT +ETag: "21025-dc7-39462498" + +header length is ........: 239 +header length should be..: 239 + + + +# Client-side + + +http +http-proxy + +# tool is what to use instead of 'curl' + +lib1509 + + + +simple multi http:// through proxytunnel with authentication info + + +http://the.old.moo.1509:%HTTPPORT/1509 %HOSTIP:%PROXYPORT + + +foo + bar +bar + foo +moo + + + +# Verify data after the test has been "shot" + + +CONNECT the.old.moo.1509:%HTTPPORT HTTP/1.1 +Host: the.old.moo.1509:%HTTPPORT +Proxy-Connection: Keep-Alive + + + +GET /1509 HTTP/1.1 +Host: the.old.moo.1509:%HTTPPORT +Accept: */* + +[DISCONNECT] + + + diff --git a/tests/data/test206 b/tests/data/test206 index 9c1e0248d..3ddc1d995 100644 --- a/tests/data/test206 +++ b/tests/data/test206 @@ -14,16 +14,18 @@ HTTP proxy Digest auth connection-monitor +auth_required + # this is returned first since we get no proxy-auth - + HTTP/1.1 407 Authorization Required to proxy me my dear Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345" Content-Length: 33 And you should ignore this data. - + # this is returned when we get a GET! @@ -38,11 +40,11 @@ daniel # then this is returned when we get proxy-auth - + HTTP/1.1 200 OK swsbounce Server: no - + HTTP/1.1 407 Authorization Required to proxy me my dear @@ -75,7 +77,7 @@ crypto HTTP proxy CONNECT auth Digest -http://test.remote.haxx.se:206/path/2060002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel +http://test.remote.haxx.se.206:%HTTPPORT/path/2060002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel @@ -85,18 +87,18 @@ http://test.remote.haxx.se:206/path/2060002 --proxy http://%HOSTIP:%HTTPPORT --p ^User-Agent: curl/.* -CONNECT test.remote.haxx.se:206 HTTP/1.1 -Host: test.remote.haxx.se:206 +CONNECT test.remote.haxx.se.206:%HTTPPORT HTTP/1.1 +Host: test.remote.haxx.se.206:%HTTPPORT Proxy-Connection: Keep-Alive -CONNECT test.remote.haxx.se:206 HTTP/1.1 -Host: test.remote.haxx.se:206 -Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se:206", response="676e0836f3e1c5b31bf29770ef9d8224" +CONNECT test.remote.haxx.se.206:%HTTPPORT HTTP/1.1 +Host: test.remote.haxx.se.206:%HTTPPORT +Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.206:%HTTPPORT", response="003e36decb4dbf6366b3ecb9b87c24ec" Proxy-Connection: Keep-Alive GET /path/2060002 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 -Host: test.remote.haxx.se:206 +Host: test.remote.haxx.se.206:%HTTPPORT Accept: */* [DISCONNECT] diff --git a/tests/data/test209 b/tests/data/test209 index b248faf9f..d8bd8bd24 100644 --- a/tests/data/test209 +++ b/tests/data/test209 @@ -13,21 +13,21 @@ HTTP proxy NTLM auth # this is returned first since we get no proxy-auth - + HTTP/1.1 407 Authorization Required to proxy me my dear Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== And you should ignore this data. - + # This is supposed to be returned when the server gets the second # Authorization: NTLM line passed-in from the client - + HTTP/1.1 200 Things are fine in proxy land Server: Microsoft-IIS/5.0 Content-Type: text/html; charset=iso-8859-1 - + # this is returned when we get a GET! @@ -86,7 +86,7 @@ CURL_GETHOSTNAME=curlhost LD_PRELOAD=%PWD/libtest/.libs/libhostname.so -http://test.remote.example.com:209/path/2090002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel +http://test.remote.example.com.209:%HTTPPORT/path/2090002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel chkhostname curlhost @@ -99,19 +99,19 @@ chkhostname curlhost ^User-Agent: curl/.* -CONNECT test.remote.example.com:209 HTTP/1.1 -Host: test.remote.example.com:209 +CONNECT test.remote.example.com.209:%HTTPPORT HTTP/1.1 +Host: test.remote.example.com.209:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= Proxy-Connection: Keep-Alive -CONNECT test.remote.example.com:209 HTTP/1.1 -Host: test.remote.example.com:209 +CONNECT test.remote.example.com.209:%HTTPPORT HTTP/1.1 +Host: test.remote.example.com.209:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q= Proxy-Connection: Keep-Alive GET /path/2090002 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 -Host: test.remote.example.com:209 +Host: test.remote.example.com.209:%HTTPPORT Accept: */* diff --git a/tests/data/test213 b/tests/data/test213 index 55b20b0d8..5c14aa875 100644 --- a/tests/data/test213 +++ b/tests/data/test213 @@ -13,21 +13,21 @@ HTTP proxy NTLM auth # this is returned first since we get no proxy-auth - + HTTP/1.1 407 Authorization Required to proxy me my dear Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== And you should ignore this data. - + # This is supposed to be returned when the server gets the second # Authorization: NTLM line passed-in from the client - + HTTP/1.1 200 Things are fine in proxy land Server: Microsoft-IIS/5.0 Content-Type: text/html; charset=iso-8859-1 - + # this is returned when we get a GET! @@ -86,7 +86,7 @@ CURL_GETHOSTNAME=curlhost LD_PRELOAD=%PWD/libtest/.libs/libhostname.so -http://test.remote.example.com:213/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit" +http://test.remote.example.com.213:%HTTPPORT/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit" chkhostname curlhost @@ -99,19 +99,19 @@ chkhostname curlhost ^User-Agent: curl/.* -CONNECT test.remote.example.com:213 HTTP/1.0 -Host: test.remote.example.com:213 +CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0 +Host: test.remote.example.com.213:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= Proxy-Connection: Keep-Alive -CONNECT test.remote.example.com:213 HTTP/1.0 -Host: test.remote.example.com:213 +CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0 +Host: test.remote.example.com.213:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q= Proxy-Connection: Keep-Alive POST /path/2130002 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 -Host: test.remote.example.com:213 +Host: test.remote.example.com.213:%HTTPPORT Accept: */* Content-Length: 6 Content-Type: application/x-www-form-urlencoded diff --git a/tests/data/test217 b/tests/data/test217 index 4b1bed9c9..f10df566b 100644 --- a/tests/data/test217 +++ b/tests/data/test217 @@ -15,11 +15,11 @@ followlocation # this is returned first since we get no proxy-auth - + HTTP/1.1 405 Method Not Allowed swsclose And you should ignore this data. - + @@ -32,7 +32,7 @@ http HTTP proxy CONNECT to proxy returning 405 -http://test.remote.example.com:217/path/2170002 --proxy http://%HOSTIP:%HTTPPORT --proxytunnel -w "%{http_code} %{http_connect}\n" +http://test.remote.example.com.217:%HTTPPORT/path/2170002 --proxy http://%HOSTIP:%HTTPPORT --proxytunnel -w "%{http_code} %{http_connect}\n" @@ -42,8 +42,8 @@ http://test.remote.example.com:217/path/2170002 --proxy http://%HOSTIP:%HTTPPORT ^User-Agent: curl/.* -CONNECT test.remote.example.com:217 HTTP/1.1 -Host: test.remote.example.com:217 +CONNECT test.remote.example.com.217:%HTTPPORT HTTP/1.1 +Host: test.remote.example.com.217:%HTTPPORT Proxy-Connection: Keep-Alive diff --git a/tests/data/test265 b/tests/data/test265 index dfac8bfaf..07de45547 100644 --- a/tests/data/test265 +++ b/tests/data/test265 @@ -13,23 +13,23 @@ HTTP proxy NTLM auth # this is returned first since we get no proxy-auth - + HTTP/1.0 407 Authorization Required to proxy me my dear Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== Content-Length: 1033 And you should ignore this data. QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQz - + # This is supposed to be returned when the server gets the second # Authorization: NTLM line passed-in from the client - + HTTP/1.1 200 Things are fine in proxy land Server: Microsoft-IIS/5.0 Content-Type: text/html; charset=iso-8859-1 - + # this is returned when we get a GET! @@ -89,7 +89,7 @@ CURL_GETHOSTNAME=curlhost LD_PRELOAD=%PWD/libtest/.libs/libhostname.so -http://test.remote.example.com:265/path/2650002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit" +http://test.remote.example.com.265:%HTTPPORT/path/2650002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit" chkhostname curlhost @@ -102,19 +102,19 @@ chkhostname curlhost ^User-Agent: curl/.* -CONNECT test.remote.example.com:265 HTTP/1.1 -Host: test.remote.example.com:265 +CONNECT test.remote.example.com.265:%HTTPPORT HTTP/1.1 +Host: test.remote.example.com.265:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= Proxy-Connection: Keep-Alive -CONNECT test.remote.example.com:265 HTTP/1.1 -Host: test.remote.example.com:265 +CONNECT test.remote.example.com.265:%HTTPPORT HTTP/1.1 +Host: test.remote.example.com.265:%HTTPPORT Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q= Proxy-Connection: Keep-Alive POST /path/2650002 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 -Host: test.remote.example.com:265 +Host: test.remote.example.com.265:%HTTPPORT Accept: */* Content-Length: 6 Content-Type: application/x-www-form-urlencoded diff --git a/tests/data/test275 b/tests/data/test275 index 713990544..ac54e2594 100644 --- a/tests/data/test275 +++ b/tests/data/test275 @@ -14,6 +14,12 @@ proxytunnel # # Server-side + +HTTP/1.1 200 OK +Connected-fine: sure + + + HTTP/1.1 200 OK Date: Thu, 09 Nov 2010 14:49:00 GMT @@ -24,7 +30,8 @@ Content-Length: 9 contents -HTTP/1.1 200 Mighty fine indeed +HTTP/1.1 200 OK +Connected-fine: sure HTTP/1.1 200 OK Date: Thu, 09 Nov 2010 14:49:00 GMT @@ -47,7 +54,7 @@ http-proxy HTTP CONNECT with proxytunnel getting two URLs from the same host -http://remotesite.com:%HTTPPORT/we/want/that/page/275 -p -x %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself http://remotesite.com:%HTTPPORT/we/want/that/page/275 +http://remotesite.com.275:%HTTPPORT/we/want/that/page/275 -p -x %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself http://remotesite.com.275:%HTTPPORT/we/want/that/page/275 @@ -58,8 +65,8 @@ http://remotesite.com:%HTTPPORT/we/want/that/page/275 -p -x %HOSTIP:%PROXYPORT - ^User-Agent:.* -CONNECT remotesite.com:%HTTPPORT HTTP/1.1 -Host: remotesite.com:%HTTPPORT +CONNECT remotesite.com.275:%HTTPPORT HTTP/1.1 +Host: remotesite.com.275:%HTTPPORT 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 Proxy-Connection: Keep-Alive @@ -68,12 +75,12 @@ Proxy-Connection: Keep-Alive GET /we/want/that/page/275 HTTP/1.1 Authorization: Basic aWFtOm15c2VsZg== -Host: remotesite.com:%HTTPPORT +Host: remotesite.com.275:%HTTPPORT Accept: */* GET /we/want/that/page/275 HTTP/1.1 Authorization: Basic aWFtOm15c2VsZg== -Host: remotesite.com:%HTTPPORT +Host: remotesite.com.275:%HTTPPORT Accept: */* diff --git a/tests/data/test287 b/tests/data/test287 index 323d3f392..ec4dfeb05 100644 --- a/tests/data/test287 +++ b/tests/data/test287 @@ -11,12 +11,11 @@ proxytunnel # Server-side -# this is returned first since we get no proxy-auth - + HTTP/1.1 405 Method Not Allowed swsclose And you should ignore this data. - + @@ -29,15 +28,15 @@ http HTTP proxy CONNECT with custom User-Agent header -http://test.remote.example.com:287/path/287 -H "User-Agent: looser/2007" --proxy http://%HOSTIP:%HTTPPORT --proxytunnel +http://test.remote.example.com.287:%HTTPPORT/path/287 -H "User-Agent: looser/2007" --proxy http://%HOSTIP:%HTTPPORT --proxytunnel # Verify data after the test has been "shot" -CONNECT test.remote.example.com:287 HTTP/1.1 -Host: test.remote.example.com:287 +CONNECT test.remote.example.com.287:%HTTPPORT HTTP/1.1 +Host: test.remote.example.com.287:%HTTPPORT Proxy-Connection: Keep-Alive User-Agent: looser/2007 diff --git a/tests/data/test302 b/tests/data/test302 index 1223f1c33..7bb162b41 100644 --- a/tests/data/test302 +++ b/tests/data/test302 @@ -9,6 +9,17 @@ FAILURE +# Server-side + + + +HTTP/1.1 405 Method Not Allowed swsclose + +And you should ignore this data. + + + + # Client-side @@ -21,7 +32,7 @@ https HTTPS GET over HTTP proxy fails --k -U fake:user -x %HOSTIP:%HTTPPORT https://bad.fakeurl-to.test/slash/302 +-k -U fake:user -x %HOSTIP:%HTTPPORT https://bad.fakeurl-to.test:302/slash/302 diff --git a/tests/data/test503 b/tests/data/test503 index 2acfc4a16..ea3148300 100644 --- a/tests/data/test503 +++ b/tests/data/test503 @@ -16,6 +16,10 @@ multi connection-monitor + +HTTP/1.1 200 Mighty fine indeed + + HTTP/1.1 200 OK swsclose Date: Thu, 09 Nov 2010 14:49:00 GMT @@ -51,7 +55,7 @@ lib503 simple multi http:// through proxytunnel with authentication info -http://%HOSTIP:%HTTPPORT/503 %HOSTIP:%PROXYPORT +http://machine.503:%HTTPPORT/503 %HOSTIP:%PROXYPORT foo @@ -65,8 +69,8 @@ moo # Verify data after the test has been "shot" -CONNECT %HOSTIP:%HTTPPORT HTTP/1.1 -Host: %HOSTIP:%HTTPPORT +CONNECT machine.503:%HTTPPORT HTTP/1.1 +Host: machine.503:%HTTPPORT Proxy-Authorization: Basic dGVzdDppbmc= Proxy-Connection: Keep-Alive @@ -74,7 +78,7 @@ Proxy-Connection: Keep-Alive GET /503 HTTP/1.1 Authorization: Basic dGVzdDppbmc= -Host: %HOSTIP:%HTTPPORT +Host: machine.503:%HTTPPORT Accept: */* [DISCONNECT] diff --git a/tests/data/test80 b/tests/data/test80 index 2fa196910..16805cabb 100644 --- a/tests/data/test80 +++ b/tests/data/test80 @@ -24,6 +24,10 @@ Content-Length: 9 contents + +HTTP/1.1 200 Mighty fine indeed + + HTTP/1.1 200 Mighty fine indeed @@ -49,7 +53,7 @@ http-proxy HTTP 1.0 CONNECT with proxytunnel and proxy+host Basic authentication -http://%HOSTIP:%HTTPPORT/we/want/that/page/80 -p --proxy1.0 %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself +http://test.80:%HTTPPORT/we/want/that/page/80 -p --proxy1.0 %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself @@ -60,8 +64,8 @@ http://%HOSTIP:%HTTPPORT/we/want/that/page/80 -p --proxy1.0 %HOSTIP:%PROXYPORT - ^User-Agent:.* -CONNECT %HOSTIP:%HTTPPORT HTTP/1.0 -Host: %HOSTIP:%HTTPPORT +CONNECT test.80:%HTTPPORT HTTP/1.0 +Host: test.80:%HTTPPORT 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 Proxy-Connection: Keep-Alive @@ -71,7 +75,7 @@ Proxy-Connection: Keep-Alive GET /we/want/that/page/80 HTTP/1.1 Authorization: Basic aWFtOm15c2VsZg== 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 +Host: test.80:%HTTPPORT Accept: */* diff --git a/tests/data/test83 b/tests/data/test83 index 3015c9ca7..4386c12b9 100644 --- a/tests/data/test83 +++ b/tests/data/test83 @@ -21,6 +21,10 @@ Content-Length: 9 contents + +HTTP/1.1 200 Mighty fine indeed + + HTTP/1.1 200 Mighty fine indeed @@ -46,7 +50,7 @@ http-proxy HTTP over proxy-tunnel with site authentication -http://%HOSTIP:%HTTPPORT/we/want/that/page/83 -p -x %HOSTIP:%PROXYPORT --user iam:myself +http://test.83:%HTTPPORT/we/want/that/page/83 -p -x %HOSTIP:%PROXYPORT --user iam:myself @@ -57,9 +61,9 @@ http://%HOSTIP:%HTTPPORT/we/want/that/page/83 -p -x %HOSTIP:%PROXYPORT --user ia ^User-Agent:.* -CONNECT %HOSTIP:%HTTPPORT HTTP/1.1 +CONNECT test.83:%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 +Host: test.83:%HTTPPORT Proxy-Connection: Keep-Alive @@ -67,7 +71,7 @@ Proxy-Connection: Keep-Alive GET /we/want/that/page/83 HTTP/1.1 Authorization: Basic aWFtOm15c2VsZg== 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 +Host: test.83:%HTTPPORT Accept: */* diff --git a/tests/data/test94 b/tests/data/test94 index a7bafa695..2f3f4824d 100644 --- a/tests/data/test94 +++ b/tests/data/test94 @@ -11,14 +11,14 @@ FAILURE # # Server-side - + HTTP/1.1 407 Needs proxy authentication Server: test-server/fake swsclose yesyes Proxy-Authenticate: Basic "oh please" Connection: close bing - + # diff --git a/tests/data/test95 b/tests/data/test95 index 55b0e6583..1cd88acab 100644 --- a/tests/data/test95 +++ b/tests/data/test95 @@ -21,6 +21,10 @@ Content-Length: 9 contents + +HTTP/1.1 200 Mighty fine indeed + + HTTP/1.1 200 Mighty fine indeed @@ -46,7 +50,7 @@ http-proxy HTTP over proxytunnel using POST -http://%HOSTIP:%HTTPPORT/we/want/that/page/95 -p -x %HOSTIP:%PROXYPORT -d "datatopost=ohthatsfunyesyes" +http://test.95:%HTTPPORT/we/want/that/page/95 -p -x %HOSTIP:%PROXYPORT -d "datatopost=ohthatsfunyesyes" @@ -57,16 +61,16 @@ http://%HOSTIP:%HTTPPORT/we/want/that/page/95 -p -x %HOSTIP:%PROXYPORT -d "datat ^User-Agent:.* -CONNECT %HOSTIP:%HTTPPORT HTTP/1.1 +CONNECT test.95:%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 +Host: test.95:%HTTPPORT Proxy-Connection: Keep-Alive POST /we/want/that/page/95 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 +Host: test.95:%HTTPPORT Accept: */* Content-Length: 27 Content-Type: application/x-www-form-urlencoded -- cgit v1.2.3