Commit c3d871ae authored by Dan Fandrich's avatar Dan Fandrich
Browse files

Added HTTP 1.0 downgrade tests with proxies

parent 59e378f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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; \

tests/data/test1077

0 → 100644
+77 −0
Original line number Diff line number Diff line
<testcase>
<info>
<keywords>
FTP
HTTP
HTTP/1.0
HTTP GET
HTTP proxy
</keywords>
</info>

#
# Server-side
<reply>
<data>
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
</data>
<data2>
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
</data2>
</reply>

#
# Client-side
<client>
<server>
http
</server>
<features>
ftp
</features>
 <name>
FTP over HTTP proxy with downgrade to HTTP 1.0
 </name>
 <command>
-x %HOSTIP:%HTTPPORT ftp://%HOSTIP:%HTTPPORT/we/want/that/page/1077 ftp://%HOSTIP:%HTTPPORT/we/want/that/page/10770002
</command>
</client>

#
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
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

</protocol>
</verify>
</testcase>

tests/data/test1078

0 → 100644
+85 −0
Original line number Diff line number Diff line
<testcase>
<info>
<keywords>
HTTP
HTTP/1.0
HTTP GET
HTTP CONNECT
proxytunnel
</keywords>
</info>

#
# Server-side
<reply>
<data nocheck="1">
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
</data>
</reply>

#
# Client-side
<client>
<server>
http
</server>
 <name>
HTTP CONNECT with proxytunnel and downgrade 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
</command>
</client>

#
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
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: */*

</protocol>
<stdout>
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
</stdout>
</verify>
</testcase>