cut off a bit more of the type-2 ntlm message since it differs between
[platform/upstream/curl.git] / tests / data / test91
1 <info>
2 <keywords>
3 HTTP
4 HTTP GET
5 HTTP NTLM auth
6 </keywords>
7 </info>
8 # Server-side
9 <reply>
10 <data>
11 HTTP/1.1 401 Authorization Required swsclose\r
12 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
13 WWW-Authenticate: Magic-Negotiate\r
14 WWW-Authenticate: NTLM\r
15 WWW-Authenticate: Basic realm="daniel"\r
16 Content-Type: text/html; charset=iso-8859-1\r
17 Content-Length: 0\r
18 Connection: close\r
19 \r
20 </data>
21
22 # This is supposed to be returned when the server gets a first
23 # Authorization: NTLM line passed-in from the client
24 <data1001>
25 HTTP/1.1 401 Now gimme that second request of crap\r
26 Server: Microsoft-IIS/5.0\r
27 Content-Length: 34\r
28 Content-Type: text/html; charset=iso-8859-1\r
29 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
30 \r
31 This is not the real page either!
32 </data1001>
33
34 # This is supposed to be returned when the server gets the second
35 # Authorization: NTLM line passed-in from the client
36 <data1002>
37 HTTP/1.1 200 Things are fine in server land swsclose\r
38 Server: Microsoft-IIS/5.0\r
39 Content-Type: text/html; charset=iso-8859-1\r
40 \r
41 Finally, this is the real page!
42 </data1002>
43
44 <datacheck>
45 HTTP/1.1 401 Authorization Required swsclose\r
46 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
47 WWW-Authenticate: Magic-Negotiate\r
48 WWW-Authenticate: NTLM\r
49 WWW-Authenticate: Basic realm="daniel"\r
50 Content-Type: text/html; charset=iso-8859-1\r
51 Content-Length: 0\r
52 Connection: close\r
53 \r
54 HTTP/1.1 401 Now gimme that second request of crap\r
55 Server: Microsoft-IIS/5.0\r
56 Content-Length: 34\r
57 Content-Type: text/html; charset=iso-8859-1\r
58 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
59 \r
60 HTTP/1.1 200 Things are fine in server land swsclose\r
61 Server: Microsoft-IIS/5.0\r
62 Content-Type: text/html; charset=iso-8859-1\r
63 \r
64 Finally, this is the real page!
65 </datacheck>
66
67 </reply>
68
69 # Client-side
70 <client>
71 <features>
72 NTLM
73 </features>
74 <server>
75 http
76 </server>
77  <name>
78 HTTP with NTLM/Negotiate/Basic, anyauth and user with domain, with size 0
79  </name>
80  <command>
81 http://%HOSTIP:%HTTPPORT/91 --anyauth -u mydomain\\myself:secret
82 </command>
83 </client>
84
85 # Verify data after the test has been "shot"
86 <verify>
87 <strip>
88 ^User-Agent:.*
89 </strip>
90 # We strip off a large chunk of the type-2 NTLM message since it depends on
91 # the local host name and thus differs on different machines!
92 <strippart>
93 s/^(Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAgACABwAAAABgAGAHgAAAA).*/$1/
94 </strippart)
95 <protocol>
96 GET /91 HTTP/1.1\r
97 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
98 Host: 127.0.0.1:%HTTPPORT\r
99 Accept: */*\r
100 \r
101 GET /91 HTTP/1.1\r
102 Authorization: NTLM TlRMTVNTUAABAAAABoIAAAAAAAAAAAAAAAAAAAAAAAA=\r
103 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
104 Host: 127.0.0.1:%HTTPPORT\r
105 Accept: */*\r
106 \r
107 GET /91 HTTP/1.1\r
108 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAgACABwAAAABgAGAHgAAAA
109 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
110 Host: 127.0.0.1:%HTTPPORT\r
111 Accept: */*\r
112 \r
113 </protocol>
114 </verify>