e2d019c06e3ffe05734738babd8ab1bf9425e0c5
[platform/upstream/curl.git] / tests / data / test88
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP PUT
6 HTTP Digest auth
7 </keywords>
8 </info>
9
10 # Server-side
11 <reply>
12 <servercmd>
13 auth_required
14 </servercmd>
15 <data>
16 HTTP/1.1 401 Authorization Required swsclose\r
17 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
18 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"\r
19 Content-Type: text/html; charset=iso-8859-1\r
20 Connection: close\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 swsclose\r
29 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
30 Content-Type: text/html; charset=iso-8859-1\r
31 Connection: close\r
32 \r
33 This IS the real page!
34 </data1000>
35
36 <datacheck>
37 HTTP/1.1 401 Authorization Required swsclose\r
38 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
39 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"\r
40 Content-Type: text/html; charset=iso-8859-1\r
41 Connection: close\r
42 \r
43 HTTP/1.1 200 OK swsclose\r
44 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
45 Content-Type: text/html; charset=iso-8859-1\r
46 Connection: close\r
47 \r
48 This IS the real page!
49 </datacheck>
50
51 </reply>
52
53 # Client-side
54 <client>
55 <server>
56 http
57 </server>
58 <features>
59 !SSPI
60 crypto
61 </features>
62  <name>
63 HTTP PUT with Digest authorization
64  </name>
65  <command>
66 http://%HOSTIP:%HTTPPORT/88 -T log/put88 -u testuser:testpass --digest
67 </command>
68 <file name="log/put88">
69 This is data we upload with PUT
70 a second line
71 line three
72 four is the number of lines
73 </file>
74 </client>
75
76 # Verify data after the test has been "shot"
77 <verify>
78 <strip>
79 ^User-Agent:.*
80 </strip>
81 <protocol>
82 PUT /88 HTTP/1.1\r
83 Host: %HOSTIP:%HTTPPORT\r
84 Accept: */*\r
85 Content-Length: 0\r
86 \r
87 PUT /88 HTTP/1.1\r
88 Host: %HOSTIP:%HTTPPORT\r
89 Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/88", response="78a49fa53d0c228778297687d4168e71"\r
90 User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
91 Accept: */*\r
92 Content-Length: 85\r
93 Expect: 100-continue\r
94 \r
95 This is data we upload with PUT
96 a second line
97 line three
98 four is the number of lines
99 </protocol>
100 </verify>
101 </testcase>