c188e792e1eea496d6bcf4302be8917bd8914113
[platform/upstream/curl.git] / tests / data / test1079
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP Digest auth
7 </keywords>
8 </info>
9
10 # Server-side
11 <reply>
12 <data>
13 HTTP/1.1 401 Authorization Required swsclose\r
14 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
15 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"\r
16 Content-Type: text/plain; charset=iso-8859-1\r
17 Content-Length: 26\r
18 \r
19 This is not the real page
20 </data>
21
22 # This is supposed to be returned when the server gets a
23 # Authorization: Digest line passed-in from the client
24 # Send nothing to force an error code 52 reply
25 <data1000>
26 </data1000>
27
28 <datacheck>
29 HTTP/1.1 401 Authorization Required swsclose\r
30 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
31 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"\r
32 Content-Type: text/plain; charset=iso-8859-1\r
33 Content-Length: 26\r
34 \r
35 </datacheck>
36
37 </reply>
38
39 # Client-side
40 <client>
41 <server>
42 http
43 </server>
44 <features>
45 crypto
46 </features>
47  <name>
48 HTTP retry after closed connection and empty response
49  </name>
50  <command>
51 http://%HOSTIP:%HTTPPORT/1079 -u testuser:testpass --digest
52 </command>
53 </client>
54
55 # Verify data after the test has been "shot"
56 <verify>
57 <errorcode>
58 52
59 </errorcode>
60 <strip>
61 ^User-Agent:.*
62 </strip>
63 <protocol>
64 GET /1079 HTTP/1.1\r
65 Host: %HOSTIP:%HTTPPORT\r
66 Accept: */*\r
67 \r
68 GET /1079 HTTP/1.1\r
69 Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/1079", response="e340c7cdca0950462070f46ee139e9f7"\r
70 Host: %HOSTIP:%HTTPPORT\r
71 Accept: */*\r
72 \r
73 </protocol>
74 </verify>
75 </testcase>