Revert "Update to 7.44.0"
[platform/upstream/curl.git] / tests / data / test1071
1 <testcase>
2 # Authorization is used to force curl to realize that the server is
3 # speaking HTTP 1.0. The request must be resent with the correct
4 # authorization header, but using HTTP 1.0, not 1.1.
5 <info>
6 <keywords>
7 HTTP
8 HTTP PUT
9 HTTP Digest auth
10 --anyauth
11 HTTP/1.0
12 </keywords>
13 </info>
14
15 # Server-side
16 <reply>
17 <data>
18 HTTP/1.0 401 Authorization Required swsclose\r
19 Server: testcurl\r
20 WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"\r
21 WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"\r
22 WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"\r
23 Content-Type: text/plain\r
24 Content-Length: 35\r
25 Connection: close\r
26 \r
27 Try again on this HTTP 1.0 server!
28 </data>
29
30 # This is supposed to be returned when the server gets a
31 # Authorization: Digest line passed-in from the client
32 <data1000>
33 HTTP/1.0 200 OK swsclose\r
34 Server: testcurl\r
35 Content-Type: text/plain\r
36 Content-Length: 23\r
37 Connection: close\r
38 \r
39 This IS the real page!
40 </data1000>
41
42 <datacheck>
43 HTTP/1.0 401 Authorization Required swsclose\r
44 Server: testcurl\r
45 WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"\r
46 WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"\r
47 WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"\r
48 Content-Type: text/plain\r
49 Content-Length: 35\r
50 Connection: close\r
51 \r
52 HTTP/1.0 200 OK swsclose\r
53 Server: testcurl\r
54 Content-Type: text/plain\r
55 Content-Length: 23\r
56 Connection: close\r
57 \r
58 This IS the real page!
59 </datacheck>
60
61 </reply>
62
63 # Client-side
64 <client>
65 <server>
66 http
67 </server>
68 <features>
69 !SSPI
70 crypto
71 </features>
72  <name>
73 Downgraded HTTP PUT to HTTP 1.0 with authorization
74  </name>
75  <command>
76 http://%HOSTIP:%HTTPPORT/1071 -T log/put1071 -u testuser:testpass --anyauth
77 </command>
78 <file name="log/put1071">
79 This is data we upload with PUT
80 a second line
81 line three
82 four is the number of lines
83 </file>
84 </client>
85
86 # Verify data after the test has been "shot"
87 <verify>
88 <strip>
89 ^User-Agent:.*
90 </strip>
91 <protocol>
92 PUT /1071 HTTP/1.1\r
93 Host: %HOSTIP:%HTTPPORT\r
94 Accept: */*\r
95 Content-Length: 85\r
96 Expect: 100-continue\r
97 \r
98 This is data we upload with PUT
99 a second line
100 line three
101 four is the number of lines
102 PUT /1071 HTTP/1.0\r
103 Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/1071", response="df4cef6b52a30e65d472dd848d2055a1"\r
104 Host: %HOSTIP:%HTTPPORT\r
105 Accept: */*\r
106 Content-Length: 85\r
107 \r
108 This is data we upload with PUT
109 a second line
110 line three
111 four is the number of lines
112 </protocol>
113 </verify>
114 </testcase>