]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Added HTTP 1.0 downgrade tests with proxies
authorDan Fandrich <dan@coneharvesters.com>
Sat, 6 Sep 2008 18:24:04 +0000 (18:24 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Sat, 6 Sep 2008 18:24:04 +0000 (18:24 +0000)
tests/data/Makefile.am
tests/data/test1077 [new file with mode: 0644]
tests/data/test1078 [new file with mode: 0644]

index a33e3d2e179825e7b1fef9b3a3f86506063e9fc2..3af445f60c6a0297037a6790b9d96c803e81bcd5 100644 (file)
@@ -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 (file)
index 0000000..7624a30
--- /dev/null
@@ -0,0 +1,77 @@
+<testcase>
+<info>
+<keywords>
+FTP
+HTTP
+HTTP/1.0
+HTTP GET
+HTTP proxy
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.0 200 OK\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Content-Type: text/plain\r
+Content-Length: 9\r
+Funny-head: yesyes\r
+Proxy-Connection: Keep-Alive\r
+\r
+contents
+</data>
+<data2>
+HTTP/1.0 200 OK\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Content-Type: text/plain\r
+Content-Length: 9\r
+Funny-head: yesyes\r
+Proxy-Connection: Keep-Alive\r
+\r
+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\r
+Host: %HOSTIP:%HTTPPORT\r
+Pragma: no-cache\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+GET ftp://%HOSTIP:%HTTPPORT/we/want/that/page/10770002 HTTP/1.0\r
+Host: %HOSTIP:%HTTPPORT\r
+Pragma: no-cache\r
+Accept: */*\r
+Proxy-Connection: Keep-Alive\r
+\r
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1078 b/tests/data/test1078
new file mode 100644 (file)
index 0000000..32e0857
--- /dev/null
@@ -0,0 +1,85 @@
+<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\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Content-Type: text/html\r
+Funny-head: yesyes\r
+Content-Length: 9\r
+Connection: keep-alive\r
+\r
+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\r
+Host: %HOSTIP:%HTTPPORT\r
+Proxy-Connection: Keep-Alive\r
+\r
+GET /we/want/that/page/1078 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+GET /we/want/that/page/1078 HTTP/1.0\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+<stdout>
+HTTP/1.1 200 Mighty fine indeed\r
+\r
+HTTP/1.0 200 OK\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Content-Type: text/html\r
+Funny-head: yesyes\r
+Content-Length: 9\r
+Connection: keep-alive\r
+\r
+contents
+HTTP/1.0 200 OK\r
+Date: Thu, 09 Nov 2010 14:49:00 GMT\r
+Server: test-server/fake\r
+Content-Type: text/html\r
+Funny-head: yesyes\r
+Content-Length: 9\r
+Connection: keep-alive\r
+\r
+contents
+</stdout>
+</verify>
+</testcase>