From c3d871aef46a07eb08b5bf580e24135d1a150425 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Sat, 6 Sep 2008 18:24:04 +0000 Subject: Added HTTP 1.0 downgrade tests with proxies --- tests/data/Makefile.am | 2 +- tests/data/test1077 | 77 +++++++++++++++++++++++++++++++++++++++++++++ tests/data/test1078 | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 163 insertions(+), 1 deletion(-) create mode 100644 tests/data/test1077 create mode 100644 tests/data/test1078 diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index a33e3d2e1..3af445f60 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -57,7 +57,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \ test1048 test1049 test1050 test1051 test1052 test1053 test1054 test1055 \ test1056 test1057 test1058 test1059 test1060 test1061 test1062 test1063 \ test1064 test1065 test1066 test1067 test1068 test1069 test1070 test1071 \ - test1072 test1073 test1074 test1075 test1076 + test1072 test1073 test1074 test1075 test1076 test1077 test1078 filecheck: @mkdir test-place; \ diff --git a/tests/data/test1077 b/tests/data/test1077 new file mode 100644 index 000000000..7624a30f4 --- /dev/null +++ b/tests/data/test1077 @@ -0,0 +1,77 @@ + + + +FTP +HTTP +HTTP/1.0 +HTTP GET +HTTP proxy + + + +# +# Server-side + + +HTTP/1.0 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Type: text/plain +Content-Length: 9 +Funny-head: yesyes +Proxy-Connection: Keep-Alive + +contents + + +HTTP/1.0 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Type: text/plain +Content-Length: 9 +Funny-head: yesyes +Proxy-Connection: Keep-Alive + +contents + + + +# +# Client-side + + +http + + +ftp + + +FTP over HTTP proxy with downgrade to HTTP 1.0 + + +-x %HOSTIP:%HTTPPORT ftp://%HOSTIP:%HTTPPORT/we/want/that/page/1077 ftp://%HOSTIP:%HTTPPORT/we/want/that/page/10770002 + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET ftp://%HOSTIP:%HTTPPORT/we/want/that/page/1077 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Pragma: no-cache +Accept: */* +Proxy-Connection: Keep-Alive + +GET ftp://%HOSTIP:%HTTPPORT/we/want/that/page/10770002 HTTP/1.0 +Host: %HOSTIP:%HTTPPORT +Pragma: no-cache +Accept: */* +Proxy-Connection: Keep-Alive + + + + diff --git a/tests/data/test1078 b/tests/data/test1078 new file mode 100644 index 000000000..32e0857cd --- /dev/null +++ b/tests/data/test1078 @@ -0,0 +1,85 @@ + + + +HTTP +HTTP/1.0 +HTTP GET +HTTP CONNECT +proxytunnel + + + +# +# Server-side + + +HTTP/1.0 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Type: text/html +Funny-head: yesyes +Content-Length: 9 +Connection: keep-alive + +contents + + + +# +# Client-side + + +http + + +HTTP CONNECT with proxytunnel and downgrade to HTTP/1.0 + + +-x %HOSTIP:%HTTPPORT -p http://%HOSTIP:%HTTPPORT/we/want/that/page/1078 http://%HOSTIP:%HTTPPORT/we/want/that/page/1078 + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +CONNECT %HOSTIP:%HTTPPORT HTTP/1.0 +Host: %HOSTIP:%HTTPPORT +Proxy-Connection: Keep-Alive + +GET /we/want/that/page/1078 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + +GET /we/want/that/page/1078 HTTP/1.0 +Host: %HOSTIP:%HTTPPORT +Accept: */* + + + +HTTP/1.1 200 Mighty fine indeed + +HTTP/1.0 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Type: text/html +Funny-head: yesyes +Content-Length: 9 +Connection: keep-alive + +contents +HTTP/1.0 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Type: text/html +Funny-head: yesyes +Content-Length: 9 +Connection: keep-alive + +contents + + + -- cgit v1.2.3