cut off a bit more of the type-2 ntlm message since it differs between
[platform/upstream/curl.git] / tests / data / test89
1 <info>
2 <keywords>
3 HTTP
4 HTTP GET
5 HTTP NTLM auth
6 followlocation
7 </keywords>
8 </info>
9 # Server-side
10 <reply>
11
12 # no <data> in this test since we have NTLM from the start
13
14 # This is supposed to be returned when the server gets a first
15 # Authorization: NTLM line passed-in from the client
16 <data1001>
17 HTTP/1.1 401 Now gimme that second request of crap\r
18 Server: Microsoft-IIS/5.0\r
19 Content-Type: text/html; charset=iso-8859-1\r
20 Content-Length: 34\r
21 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
22 \r
23 This is not the real page either!
24 </data1001>
25
26 # This is supposed to be returned when the server gets the second
27 # Authorization: NTLM line passed-in from the client
28 <data1002>
29 HTTP/1.1 301 Things are fine in server land swsclose\r
30 Server: Microsoft-IIS/5.0\r
31 Connection: close\r
32 Location: /you/890010\r
33 \r
34 </data1002>
35
36 # This is the first reply after the redirection
37 <data1011>
38 HTTP/1.1 401 Now gimme that second round of crap\r
39 Server: Microsoft-IIS/5.0\r
40 Content-Type: text/html; charset=iso-8859-1\r
41 Content-Length: 34\r
42 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
43 \r
44 This is not the real page either!
45 </data1011>
46
47 # This is supposed to be returned when the server gets the second
48 # Authorization: NTLM line passed-in from the client
49 <data1012>
50 HTTP/1.1 200 Things are fine in server land swsclose\r
51 Server: Microsoft-IIS/5.0\r
52 Content-Type: text/html; charset=iso-8859-1\r
53 \r
54 Finally, this is the real page!
55 </data1012>
56
57 <datacheck>
58 HTTP/1.1 401 Now gimme that second request of crap\r
59 Server: Microsoft-IIS/5.0\r
60 Content-Type: text/html; charset=iso-8859-1\r
61 Content-Length: 34\r
62 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
63 \r
64 HTTP/1.1 301 Things are fine in server land swsclose\r
65 Server: Microsoft-IIS/5.0\r
66 Connection: close\r
67 Location: /you/890010\r
68 \r
69 HTTP/1.1 401 Now gimme that second round of crap\r
70 Server: Microsoft-IIS/5.0\r
71 Content-Type: text/html; charset=iso-8859-1\r
72 Content-Length: 34\r
73 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
74 \r
75 HTTP/1.1 200 Things are fine in server land swsclose\r
76 Server: Microsoft-IIS/5.0\r
77 Content-Type: text/html; charset=iso-8859-1\r
78 \r
79 Finally, this is the real page!
80 </datacheck>
81
82 </reply>
83
84 # Client-side
85 <client>
86 <features>
87 NTLM
88 </features>
89 <server>
90 http
91 </server>
92  <name>
93 HTTP with NTLM and follow-location
94  </name>
95  <command>
96 http://%HOSTIP:%HTTPPORT/89 -u testuser:testpass --ntlm -L
97 </command>
98 </client>
99
100 # Verify data after the test has been "shot"
101 <verify>
102 <strip>
103 ^User-Agent:.*
104 </strip>
105 # We strip off a large chunk of the type-2 NTLM message since it depends on
106 # the local host name and thus differs on different machines!
107 <strippart>
108 s/^(Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA).*/$1/
109 </strippart)
110 <protocol>
111 GET /89 HTTP/1.1\r
112 Authorization: NTLM TlRMTVNTUAABAAAABoIAAAAAAAAAAAAAAAAAAAAAAAA=\r
113 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
114 Host: 127.0.0.1:%HTTPPORT\r
115 Accept: */*\r
116 \r
117 GET /89 HTTP/1.1\r
118 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
119 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
120 Host: 127.0.0.1:%HTTPPORT\r
121 Accept: */*\r
122 \r
123 GET /you/890010 HTTP/1.1\r
124 Authorization: NTLM TlRMTVNTUAABAAAABoIAAAAAAAAAAAAAAAAAAAAAAAA=\r
125 User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS\r
126 Host: 127.0.0.1:%HTTPPORT\r
127 Accept: */*\r
128 \r
129 GET /you/890010 HTTP/1.1\r
130 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
131 User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS\r
132 Host: 127.0.0.1:%HTTPPORT\r
133 Accept: */*\r
134 \r
135 </protocol>
136 </verify>