Imported Upstream version 7.40.0
[platform/upstream/curl.git] / tests / data / test1325
1 <testcase>
2 # http://greenbytes.de/tech/webdav/draft-reschke-http-status-308-latest.html
3 <info>
4 <keywords>
5 HTTP
6 HTTP GET
7 308
8 followlocation
9 </keywords>
10 </info>
11 #
12 # Server-side
13 <reply>
14 <data>
15 HTTP/1.1 308 OK swsclose\r
16 Location: 13250002\r
17 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
18 Connection: close\r
19 \r
20 </data>
21 <data2>
22 HTTP/1.1 200 OK swsclose\r
23 Location: this should be ignored\r
24 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
25 Connection: close\r
26 \r
27 body
28 </data2>
29 <datacheck>
30 HTTP/1.1 308 OK swsclose\r
31 Location: 13250002\r
32 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
33 Connection: close\r
34 \r
35 HTTP/1.1 200 OK swsclose\r
36 Location: this should be ignored\r
37 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
38 Connection: close\r
39 \r
40 body
41 </datacheck>
42 </reply>
43
44 #
45 # Client-side
46 <client>
47 <server>
48 http
49 </server>
50  <name>
51 HTTP 308-redirect with POST
52  </name>
53  <command>
54 http://%HOSTIP:%HTTPPORT/we/1325 -L -d "moo"
55 </command>
56 </client>
57
58 #
59 # Verify data after the test has been "shot"
60 <verify>
61 <strip>
62 ^User-Agent:.*
63 </strip>
64 <protocol nonewline="yes">
65 POST /we/1325 HTTP/1.1\r
66 Host: %HOSTIP:%HTTPPORT\r
67 Accept: */*\r
68 Content-Length: 3\r
69 Content-Type: application/x-www-form-urlencoded\r
70 \r
71 mooPOST /we/13250002 HTTP/1.1\r
72 Host: %HOSTIP:%HTTPPORT\r
73 Accept: */*\r
74 Content-Length: 3\r
75 Content-Type: application/x-www-form-urlencoded\r
76 \r
77 moo
78 </protocol>
79 </verify>
80 </testcase>