Git init
[external/curl.git] / tests / data / test67
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
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
17 <data1001>
18 HTTP/1.1 401 Now gimme that second request of crap\r
19 Server: Microsoft-IIS/5.0\r
20 Content-Type: text/html; charset=iso-8859-1\r
21 Content-Length: 34\r
22 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
23 \r
24 This is not the real page either!
25 </data1001>
26
27 # This is supposed to be returned when the server gets the second
28 # Authorization: NTLM line passed-in from the client
29 <data1002>
30 HTTP/1.1 200 Things are fine in server land swsclose\r
31 Server: Microsoft-IIS/5.0\r
32 Content-Type: text/html; charset=iso-8859-1\r
33 Content-Length: 32\r
34 \r
35 Finally, this is the real page!
36 </data1002>
37
38 <datacheck>
39 HTTP/1.1 401 Now gimme that second request of crap\r
40 Server: Microsoft-IIS/5.0\r
41 Content-Type: text/html; charset=iso-8859-1\r
42 Content-Length: 34\r
43 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
44 \r
45 HTTP/1.1 200 Things are fine in server land swsclose\r
46 Server: Microsoft-IIS/5.0\r
47 Content-Type: text/html; charset=iso-8859-1\r
48 Content-Length: 32\r
49 \r
50 Finally, this is the real page!
51 </datacheck>
52
53 </reply>
54
55 # Client-side
56 <client>
57 <features>
58 NTLM
59 </features>
60 <server>
61 http
62 </server>
63  <name>
64 HTTP with NTLM authorization
65  </name>
66  <setenv>
67 # we force our own host name, in order to make the test machine independent
68 CURL_GETHOSTNAME=curlhost
69 # we try to use the LD_PRELOAD hack, if not a debug build
70 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
71  </setenv>
72  <command>
73 http://%HOSTIP:%HTTPPORT/67 -u testuser:testpass --ntlm
74 </command>
75 <precheck>
76 chkhostname curlhost
77 </precheck>
78 </client>
79
80 # Verify data after the test has been "shot"
81 <verify>
82 <strip>
83 ^User-Agent:.*
84 </strip>
85 <protocol>
86 GET /67 HTTP/1.1\r
87 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
88 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
89 Host: %HOSTIP:%HTTPPORT\r
90 Accept: */*\r
91 \r
92 GET /67 HTTP/1.1\r
93 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=\r
94 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
95 Host: %HOSTIP:%HTTPPORT\r
96 Accept: */*\r
97 \r
98 </protocol>
99 </verify>
100 </testcase>