Revert "Update to 7.40.1"
[platform/upstream/curl.git] / tests / data / test1030
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP PUT
6 HTTP Digest auth
7 --anyauth
8 </keywords>
9 </info>
10
11 # Server-side
12 <reply>
13 <data>
14 HTTP/1.1 401 Authorization Required\r
15 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
16 WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"\r
17 WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"\r
18 WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"\r
19 Content-Length: 26\r
20 Content-Type: text/html; charset=iso-8859-1\r
21 \r
22 This is not the real page
23 </data>
24
25 # This is supposed to be returned when the server gets a
26 # Authorization: Digest line passed-in from the client
27 <data1000>
28 HTTP/1.1 200 OK\r
29 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
30 Content-Type: text/html; charset=iso-8859-1\r
31 Content-Length: 23\r
32 Connection: close\r
33 \r
34 This IS the real page!
35 </data1000>
36
37 <datacheck>
38 HTTP/1.1 401 Authorization Required\r
39 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
40 WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"\r
41 WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"\r
42 WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"\r
43 Content-Length: 26\r
44 Content-Type: text/html; charset=iso-8859-1\r
45 \r
46 HTTP/1.1 200 OK\r
47 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
48 Content-Type: text/html; charset=iso-8859-1\r
49 Content-Length: 23\r
50 Connection: close\r
51 \r
52 This IS the real page!
53 </datacheck>
54
55 </reply>
56
57 # Client-side
58 <client>
59 <server>
60 http
61 </server>
62 <features>
63 crypto
64 </features>
65  <name>
66 HTTP PUT with --anyauth authorization (picking Digest)
67  </name>
68  <command>
69 http://%HOSTIP:%HTTPPORT/1030 -T log/put1030 -u testuser:testpass --anyauth
70 </command>
71 <file name="log/put1030">
72 This is data we upload with PUT
73 a second line
74 line three
75 four is the number of lines
76 </file>
77 </client>
78
79 # Verify data after the test has been "shot"
80 <verify>
81 <strip>
82 ^User-Agent:.*
83 </strip>
84 <protocol>
85 PUT /1030 HTTP/1.1\r
86 Host: %HOSTIP:%HTTPPORT\r
87 Accept: */*\r
88 Content-Length: 85\r
89 Expect: 100-continue\r
90 \r
91 This is data we upload with PUT
92 a second line
93 line three
94 four is the number of lines
95 PUT /1030 HTTP/1.1\r
96 Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/1030", response="01cb59db1ddaac246b072d5f5f0716d9"\r
97 User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
98 Host: %HOSTIP:%HTTPPORT\r
99 Accept: */*\r
100 Content-Length: 85\r
101 Expect: 100-continue\r
102 \r
103 This is data we upload with PUT
104 a second line
105 line three
106 four is the number of lines
107 </protocol>
108 </verify>
109 </testcase>