From 1dd69921d314b9d44dce9836e7f2c65272241afd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 5 Apr 2012 23:37:16 +0200 Subject: test: added test 1332 that tests --post303 --- tests/data/Makefile.am | 2 +- tests/data/test1332 | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 tests/data/test1332 (limited to 'tests') 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 + + + +HTTP +HTTP POST +followlocation + + +# +# Server-side + + +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 + + +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 + + + +# +# Client-side + + +http + + +HTTP POST with 303 redirect and --post303 + + +http://%HOSTIP:%HTTPPORT/blah/1332 -L -d "moo" --post303 + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +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 + + + -- cgit v1.2.3