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