blob: 5a1cf34c6ffb05573f0723ecaa7e19ddf314bcba [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001<testcase>
2<info>
3<keywords>
4HTTP
5HTTP PUT
6followlocation
7</keywords>
8
9</info>
10# Server-side
11<reply>
12<data>
13HTTP/1.1 301 Redirect swsclose
14Date: Thu, 29 Jul 2008 14:49:00 GMT
15Server: test-server/fake
16Location: data/%TESTNUMBER0002.txt?coolsite=yes
17Content-Length: 0
18Connection: close
19
20</data>
21<data2>
22HTTP/1.1 100 Continue
23
24HTTP/1.1 200 Followed here fine swsclose
25Date: Thu, 29 Jul 2008 14:49:00 GMT
26Server: test-server/fake
27Content-Length: 51
28
29If this is received, the location following worked
30</data2>
31<datacheck>
32HTTP/1.1 301 Redirect swsclose
33Date: Thu, 29 Jul 2008 14:49:00 GMT
34Server: test-server/fake
35Location: data/%TESTNUMBER0002.txt?coolsite=yes
36Content-Length: 0
37Connection: close
38
39HTTP/1.1 100 Continue
40
41HTTP/1.1 200 Followed here fine swsclose
42Date: Thu, 29 Jul 2008 14:49:00 GMT
43Server: test-server/fake
44Content-Length: 51
45
46If this is received, the location following worked
47</datacheck>
48</reply>
49
50# Client-side
51<client>
52<server>
53http
54</server>
55 <name>
56HTTP PUT with Location: following
57 </name>
58 <command>
59http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -T log/test%TESTNUMBER.txt
60</command>
61<file name="log/test%TESTNUMBER.txt">
62Weird
63 file
64 to
65 upload
66for
67 testing
68the
69 PUT
70 feature
71</file>
72</client>
73
74# Verify data after the test has been "shot"
75<verify>
76
77# The primary reason libcurl sends the data part twice in this test is that
78# the test HTTP server is blocking until it has read the entire request,
79# including the full request-body before it responds. So in this test the
80# server says 301 and 100 _after_ the entire PUT body has been sent.
81
82<protocol>
83PUT /want/%TESTNUMBER HTTP/1.1
84Host: %HOSTIP:%HTTPPORT
85User-Agent: curl/%VERSION
86Accept: */*
87Content-Length: 78
88Expect: 100-continue
89
90Weird
91 file
92 to
93 upload
94for
95 testing
96the
97 PUT
98 feature
99PUT /want/data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1
100Host: %HOSTIP:%HTTPPORT
101User-Agent: curl/%VERSION
102Accept: */*
103Content-Length: 78
104Expect: 100-continue
105
106Weird
107 file
108 to
109 upload
110for
111 testing
112the
113 PUT
114 feature
115</protocol>
116</verify>
117</testcase>