50603b05a947e54df6d077e8d17c47481ba9dcef
[platform/upstream/curl.git] / tests / data / test69
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP NTLM auth
7 </keywords>
8 </info>
9 # Server-side
10 <reply>
11 <data>
12 HTTP/1.1 401 Authorization Required swsclose\r
13 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
14 WWW-Authenticate: Basic\r
15 WWW-Authenticate: Wild-and-crazy\r
16 WWW-Authenticate: NTLM\r
17 Content-Type: text/html; charset=iso-8859-1\r
18 Content-Length: 26\r
19 \r
20 This is not the real page
21 </data>
22
23 # This is supposed to be returned when the server gets a first
24 # Authorization: NTLM line passed-in from the client
25 <data1001>
26 HTTP/1.1 401 Now gimme that second request of crap\r
27 Server: Microsoft-IIS/5.0\r
28 Content-Length: 34\r
29 Content-Type: text/html; charset=iso-8859-1\r
30 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
31 \r
32 This is not the real page either!
33 </data1001>
34
35 # This is supposed to be returned when the server gets the second
36 # Authorization: NTLM line passed-in from the client
37 <data1002>
38 HTTP/1.1 200 Things are fine in server land swsclose\r
39 Server: Microsoft-IIS/5.0\r
40 Content-Type: text/html; charset=iso-8859-1\r
41 Content-Length: 32\r
42 \r
43 Finally, this is the real page!
44 </data1002>
45
46 <datacheck>
47 HTTP/1.1 401 Authorization Required swsclose\r
48 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
49 WWW-Authenticate: Basic\r
50 WWW-Authenticate: Wild-and-crazy\r
51 WWW-Authenticate: NTLM\r
52 Content-Type: text/html; charset=iso-8859-1\r
53 Content-Length: 26\r
54 \r
55 HTTP/1.1 401 Now gimme that second request of crap\r
56 Server: Microsoft-IIS/5.0\r
57 Content-Length: 34\r
58 Content-Type: text/html; charset=iso-8859-1\r
59 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
60 \r
61 HTTP/1.1 200 Things are fine in server land swsclose\r
62 Server: Microsoft-IIS/5.0\r
63 Content-Type: text/html; charset=iso-8859-1\r
64 Content-Length: 32\r
65 \r
66 Finally, this is the real page!
67 </datacheck>
68
69 </reply>
70
71 # Client-side
72 <client>
73 <features>
74 NTLM
75 !SSPI
76 debug
77 </features>
78 <server>
79 http
80 </server>
81  <name>
82 HTTP with NTLM, Basic or Wild-and-crazy authorization
83  </name>
84  <setenv>
85 # we force our own host name, in order to make the test machine independent
86 CURL_GETHOSTNAME=curlhost
87 # we try to use the LD_PRELOAD hack, if not a debug build
88 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
89  </setenv>
90  <command>
91 http://%HOSTIP:%HTTPPORT/69 -u testuser:testpass --anyauth
92 </command>
93 <precheck>
94 chkhostname curlhost
95 </precheck>
96 </client>
97
98 # Verify data after the test has been "shot"
99 <verify>
100 <strip>
101 ^User-Agent:.*
102 </strip>
103 <protocol>
104 GET /69 HTTP/1.1\r
105 User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
106 Host: %HOSTIP:%HTTPPORT\r
107 Accept: */*\r
108 \r
109 GET /69 HTTP/1.1\r
110 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
111 User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
112 Host: %HOSTIP:%HTTPPORT\r
113 Accept: */*\r
114 \r
115 GET /69 HTTP/1.1\r
116 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==\r
117 User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
118 Host: %HOSTIP:%HTTPPORT\r
119 Accept: */*\r
120 \r
121 </protocol>
122 </verify>
123 </testcase>