aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-04-05 23:37:16 +0200
committerDaniel Stenberg <daniel@haxx.se>2012-04-05 23:37:16 +0200
commit1dd69921d314b9d44dce9836e7f2c65272241afd (patch)
treec21bb113ea44c0c45719e99bd5fecd3f68f2d556 /tests
parent29e68b200cd35aaf2bfd0e43ecc2a50efbab674d (diff)
test: added test 1332 that tests --post303
Diffstat (limited to 'tests')
-rw-r--r--tests/data/Makefile.am2
-rw-r--r--tests/data/test133280
2 files changed, 81 insertions, 1 deletions
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index f2f0c77f3..0fb16a6cd 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -83,7 +83,7 @@ test1300 test1301 test1302 test1303 test1304 test1305 \
test1306 test1307 test1308 test1309 test1310 test1311 test1312 test1313 \
test1314 test1315 test1316 test1317 test1318 test1319 test1320 test1321 \
test1322 test1323 test1324 test1325 test1326 test1327 test1328 test1329 \
-test1331 \
+test1331 test1332 \
test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
test2000 test2001 test2002 test2003 test2004
diff --git a/tests/data/test1332 b/tests/data/test1332
new file mode 100644
index 000000000..1850ece80
--- /dev/null
+++ b/tests/data/test1332
@@ -0,0 +1,80 @@
+# test case cloned from 1076 and then 302 was replaced with 303
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+followlocation
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 303 OK swsclose
+Location: moo.html&testcase=/13320002
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+</data>
+<data2>
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+body
+</data2>
+<datacheck>
+HTTP/1.1 303 OK swsclose
+Location: moo.html&testcase=/13320002
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+body
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP POST with 303 redirect and --post303
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/blah/1332 -L -d "moo" --post303
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol nonewline="yes">
+POST /blah/1332 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 3
+Content-Type: application/x-www-form-urlencoded
+
+mooPOST /blah/moo.html&testcase=/13320002 HTTP/1.1
+User-Agent: curl/7.10 (i686-pc-linux-gnu) libcurl/7.10 OpenSSL/0.9.6c ipv6 zlib/1.1.3
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 3
+Content-Type: application/x-www-form-urlencoded
+
+moo
+</protocol>
+</verify>
+</testcase>