1 <testcase> 2 # test case cloned from 1076 and then 302 was replaced with 303 3 <info> 4 <keywords> 5 HTTP 6 HTTP POST 7 followlocation 8 </keywords> 9 </info> 10 # 11 # Server-side 12 <reply> 13 <data> 14 HTTP/1.1 303 OK swsclose 15 Location: moo.html&testcase=/13320002 16 Date: Thu, 09 Nov 2010 14:49:00 GMT 17 Connection: close 18 19 </data> 20 <data2> 21 HTTP/1.1 200 OK swsclose 22 Location: this should be ignored 23 Date: Thu, 09 Nov 2010 14:49:00 GMT 24 Connection: close 25 26 body 27 </data2> 28 <datacheck> 29 HTTP/1.1 303 OK swsclose 30 Location: moo.html&testcase=/13320002 31 Date: Thu, 09 Nov 2010 14:49:00 GMT 32 Connection: close 33 34 HTTP/1.1 200 OK swsclose 35 Location: this should be ignored 36 Date: Thu, 09 Nov 2010 14:49:00 GMT 37 Connection: close 38 39 body 40 </datacheck> 41 </reply> 42 43 # 44 # Client-side 45 <client> 46 <server> 47 http 48 </server> 49 <name> 50 HTTP POST with 303 redirect and --post303 51 </name> 52 <command> 53 http://%HOSTIP:%HTTPPORT/blah/1332 -L -d "moo" --post303 54 </command> 55 </client> 56 57 # 58 # Verify data after the test has been "shot" 59 <verify> 60 <strip> 61 ^User-Agent:.* 62 </strip> 63 <protocol nonewline="yes"> 64 POST /blah/1332 HTTP/1.1 65 Host: %HOSTIP:%HTTPPORT 66 Accept: */* 67 Content-Length: 3 68 Content-Type: application/x-www-form-urlencoded 69 70 mooPOST /blah/moo.html&testcase=/13320002 HTTP/1.1 71 User-Agent: curl/7.10 (i686-pc-linux-gnu) libcurl/7.10 OpenSSL/0.9.6c ipv6 zlib/1.1.3 72 Host: %HOSTIP:%HTTPPORT 73 Accept: */* 74 Content-Length: 3 75 Content-Type: application/x-www-form-urlencoded 76 77 moo 78 </protocol> 79 </verify> 80 </testcase> 81