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