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