• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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<protocol>
53PUT /1073 HTTP/1.1
54Host: %HOSTIP:%HTTPPORT
55User-Agent: curl/%VERSION
56Accept: */*
57Transfer-Encoding: chunked
58Expect: 100-continue
59
607a
61This is data we upload with PUT
62it comes from stdin so MUST be sent
63with chunked encoding
64which is impossible in HTTP/1.0
65
660
67
68</protocol>
69</verify>
70</testcase>
71