02a2772915c7bf3e2b709afaf7b2ee7ec2e1f775
[platform/upstream/curl.git] / tests / data / test245
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP POST
6 HTTP Digest auth
7 </keywords>
8 </info>
9
10 # Server-side
11 <reply>
12 <data>
13 HTTP/1.1 401 authentication please swsbounce\r
14 Server: Microsoft-IIS/6.0\r
15 WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"\r
16 Content-Type: text/html; charset=iso-8859-1\r
17 Content-Length: 0\r
18 \r
19 </data>
20 <data1000>
21 HTTP/1.1 200 A OK\r
22 Server: Microsoft-IIS/6.0\r
23 Content-Type: text/html; charset=iso-8859-1\r
24 Content-Length: 3\r
25 \r
26 ok
27 </data1000>
28
29 <datacheck>
30 HTTP/1.1 401 authentication please swsbounce\r
31 Server: Microsoft-IIS/6.0\r
32 WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"\r
33 Content-Type: text/html; charset=iso-8859-1\r
34 Content-Length: 0\r
35 \r
36 HTTP/1.1 200 A OK\r
37 Server: Microsoft-IIS/6.0\r
38 Content-Type: text/html; charset=iso-8859-1\r
39 Content-Length: 3\r
40 \r
41 ok
42 </datacheck>
43
44 </reply>
45
46 # Client-side
47 <client>
48
49 <server>
50 http
51 </server>
52 <features>
53 !SSPI
54 crypto
55 </features>
56  <name>
57 HTTP POST --digest
58  </name>
59  <command>
60 http://%HOSTIP:%HTTPPORT/245 -u auser:apasswd --digest -d "junkelijunk"
61 </command>
62 </client>
63
64 # Verify data after the test has been "shot"
65 <verify>
66 <strip>
67 ^User-Agent:.*
68 </strip>
69 <protocol nonewline="yes">
70 POST /245 HTTP/1.1\r
71 User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6\r
72 Host: %HOSTIP:%HTTPPORT\r
73 Accept: */*\r
74 Content-Length: 0\r
75 Content-Type: application/x-www-form-urlencoded\r
76 \r
77 POST /245 HTTP/1.1\r
78 Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/245", response="379a439b1737ba257c1d2f103914b18b"\r
79 User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
80 Host: %HOSTIP:%HTTPPORT\r
81 Accept: */*\r
82 Content-Length: 11\r
83 Content-Type: application/x-www-form-urlencoded\r
84 \r
85 junkelijunk
86 </protocol>
87 </verify>
88 </testcase>