tizen 2.3.1 release
[external/curl.git] / tests / data / test246
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 100 Continue\r
14 Server: Microsoft-IIS/5.0\r
15 Date: Sun, 03 Apr 2005 14:57:45 GMT\r
16 X-Powered-By: ASP.NET\r
17 \r
18 HTTP/1.1 401 authentication please swsbounce\r
19 Server: Microsoft-IIS/6.0\r
20 WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"\r
21 Content-Type: text/html; charset=iso-8859-1\r
22 Content-Length: 0\r
23 \r
24 </data>
25 <data1000>
26 HTTP/1.1 200 A OK\r
27 Server: Microsoft-IIS/6.0\r
28 Content-Type: text/html; charset=iso-8859-1\r
29 Content-Length: 3\r
30 \r
31 ok
32 </data1000>
33
34 <datacheck>
35 HTTP/1.1 100 Continue\r
36 Server: Microsoft-IIS/5.0\r
37 Date: Sun, 03 Apr 2005 14:57:45 GMT\r
38 X-Powered-By: ASP.NET\r
39 \r
40 HTTP/1.1 401 authentication please swsbounce\r
41 Server: Microsoft-IIS/6.0\r
42 WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"\r
43 Content-Type: text/html; charset=iso-8859-1\r
44 Content-Length: 0\r
45 \r
46 HTTP/1.1 200 A OK\r
47 Server: Microsoft-IIS/6.0\r
48 Content-Type: text/html; charset=iso-8859-1\r
49 Content-Length: 3\r
50 \r
51 ok
52 </datacheck>
53
54 </reply>
55
56 # Client-side
57 <client>
58
59 <server>
60 http
61 </server>
62 <features>
63 !SSPI
64 crypto
65 </features>
66  <name>
67 HTTP POST --digest with server doing a 100 before 401 response
68  </name>
69  <command>
70 http://%HOSTIP:%HTTPPORT/246 -u auser:apasswd --digest -d "junkelijunk"
71 </command>
72 </client>
73
74 # Verify data after the test has been "shot"
75 <verify>
76 <strip>
77 ^User-Agent:.*
78 </strip>
79 <protocol nonewline="yes">
80 POST /246 HTTP/1.1\r
81 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
82 Host: %HOSTIP:%HTTPPORT\r
83 Accept: */*\r
84 Content-Length: 0\r
85 Content-Type: application/x-www-form-urlencoded\r
86 \r
87 POST /246 HTTP/1.1\r
88 Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/246", response="761e6fc9a760c39d587092e8d840e740"\r
89 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
90 Host: %HOSTIP:%HTTPPORT\r
91 Accept: */*\r
92 Content-Length: 11\r
93 Content-Type: application/x-www-form-urlencoded\r
94 \r
95 junkelijunk
96 </protocol>
97 </verify>
98 </testcase>