tizen 2.3.1 release
[external/curl.git] / tests / data / test1204
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP Basic auth
7 --anyauth
8 </keywords>
9 </info>
10 # Server-side
11 <reply>
12 <data>
13 HTTP/1.1 401 Authorization Required swsbounce\r
14 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
15 WWW-Authenticate: X-MobileMe-AuthToken realm="Newcastle", Basic realm="fun fun  fun"\r
16 Content-Type: text/html; 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 the second request
23 <data1>
24 HTTP/1.1 200 OK\r
25 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
26 Content-Type: text/html; charset=iso-8859-1\r
27 Content-Length: 23\r
28 \r
29 This IS the real page!
30 </data1>
31
32 <datacheck>
33 HTTP/1.1 401 Authorization Required swsbounce\r
34 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
35 WWW-Authenticate: X-MobileMe-AuthToken realm="Newcastle", Basic realm="fun fun  fun"\r
36 Content-Type: text/html; charset=iso-8859-1\r
37 Content-Length: 26\r
38 \r
39 HTTP/1.1 200 OK\r
40 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
41 Content-Type: text/html; charset=iso-8859-1\r
42 Content-Length: 23\r
43 \r
44 This IS the real page!
45 </datacheck>
46
47 </reply>
48
49 # Client-side
50 <client>
51 <server>
52 http
53 </server>
54  <name>
55 HTTP with WWW-Authenticate and multiple auths in a single line
56  </name>
57  <command>
58 http://%HOSTIP:%HTTPPORT/1204 -u testuser:testpass --anyauth
59 </command>
60 </client>
61
62 # Verify data after the test has been "shot"
63 <verify>
64 <strip>
65 ^User-Agent:.*
66 </strip>
67 <protocol>
68 GET /1204 HTTP/1.1\r
69 Host: %HOSTIP:%HTTPPORT\r
70 Accept: */*\r
71 \r
72 GET /1204 HTTP/1.1\r
73 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
74 Host: %HOSTIP:%HTTPPORT\r
75 Accept: */*\r
76 \r
77 </protocol>
78 </verify>
79 </testcase>