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