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>
7HTTP
8HTTP PUT
9HTTP/1.0
10followlocation
11chunked Transfer-Encoding
12</keywords>
13</info>
14
15# Server-side
16<reply>
17<data>
18HTTP/1.0 301 Redirect swsclose
19Server: testcurl
20Content-Type: text/plain
21Location: /newlocation/10730002
22Content-Length: 0
23Connection: close
24
25</data>
26</reply>
27
28# Client-side
29<client>
30<server>
31http
32</server>
33 <name>
34HTTP chunked PUT to HTTP 1.0 server with redirect
35 </name>
36 <command>
37http://%HOSTIP:%HTTPPORT/1073 -T - -L
38</command>
39<stdin>
40This is data we upload with PUT
41it comes from stdin so MUST be sent
42with chunked encoding
43which is impossible in HTTP/1.0
44</stdin>
45</client>
46
47# Verify data after the test has been "shot"
48<verify>
49<errorcode>
5025
51</errorcode>
52<strip>
53^User-Agent:.*
54</strip>
55<protocol>
56PUT /1073 HTTP/1.1
57Host: %HOSTIP:%HTTPPORT
58Accept: */*
59Transfer-Encoding: chunked
60Expect: 100-continue
61
627a
63This is data we upload with PUT
64it comes from stdin so MUST be sent
65with chunked encoding
66which is impossible in HTTP/1.0
67
680
69
70</protocol>
71</verify>
72</testcase>
73