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