Git init
[external/curl.git] / tests / data / test1073
1 <testcase>
2 # Redirection is used to force curl to realize that the server is
3 # speaking HTTP 1.0. The request is impossible to satisfy with HTTP 1.0
4 # because chunked encoding is unavailable, so the request must fail.
5 <info>
6 <keywords>
7 HTTP
8 HTTP PUT
9 HTTP/1.0
10 followlocation
11 chunked Transfer-Encoding
12 </keywords>
13 </info>
14
15 # Server-side
16 <reply>
17 <data>
18 HTTP/1.0 301 Redirect swsclose\r
19 Server: testcurl\r
20 Content-Type: text/plain\r
21 Location: /newlocation/10730002\r
22 Content-Length: 0\r
23 Connection: close\r
24 \r
25 </data>
26 </reply>
27
28 # Client-side
29 <client>
30 <server>
31 http
32 </server>
33  <name>
34 HTTP chunked PUT to HTTP 1.0 server with redirect
35  </name>
36  <command>
37 http://%HOSTIP:%HTTPPORT/1073 -T - -L
38 </command>
39 <stdin>
40 This is data we upload with PUT
41 it comes from stdin so MUST be sent
42 with chunked encoding
43 which is impossible in HTTP/1.0
44 </stdin>
45 </client>
46
47 # Verify data after the test has been "shot"
48 <verify>
49 <errorcode>
50 25
51 </errorcode>
52 <strip>
53 ^User-Agent:.*
54 </strip>
55 <protocol>
56 PUT /1073 HTTP/1.1\r
57 Host: %HOSTIP:%HTTPPORT\r
58 Accept: */*\r
59 Transfer-Encoding: chunked\r
60 Expect: 100-continue\r
61 \r
62 7a\r
63 This is data we upload with PUT
64 it comes from stdin so MUST be sent
65 with chunked encoding
66 which is impossible in HTTP/1.0
67 \r
68 0\r
69 \r
70 </protocol>
71 </verify>
72 </testcase>