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