Revert "Imported Upstream version 7.53.1"
[platform/upstream/curl.git] / tests / data / test209
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP CONNECT
7 HTTP proxy
8 HTTP proxy NTLM auth
9 </keywords>
10 </info>
11
12 # Server-side
13 <reply>
14
15 # this is returned first since we get no proxy-auth
16 <connect1001>
17 HTTP/1.1 407 Authorization Required to proxy me my dear\r
18 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
19 \r
20 And you should ignore this data.
21 </connect1001>
22
23 # This is supposed to be returned when the server gets the second
24 # Authorization: NTLM line passed-in from the client
25 <connect1002>
26 HTTP/1.1 200 Things are fine in proxy land\r
27 Server: Microsoft-IIS/5.0\r
28 Content-Type: text/html; charset=iso-8859-1\r
29 \r
30 </connect1002>
31
32 # this is returned when we get a GET!
33 <data2>
34 HTTP/1.1 200 OK
35 Date: Thu, 09 Nov 2010 14:49:00 GMT
36 Content-Length: 7
37 Connection: close
38 Content-Type: text/html
39 Funny-head: yesyes
40
41 daniel
42 </data2>
43
44 # then this is returned when we get proxy-auth
45 <data1000>
46 HTTP/1.1 200 OK swsbounce\r
47 Server: no
48 \r
49 Nice proxy auth sir!
50 </data1000>
51
52 <datacheck>
53 HTTP/1.1 407 Authorization Required to proxy me my dear\r
54 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
55 \r
56 HTTP/1.1 200 Things are fine in proxy land\r
57 Server: Microsoft-IIS/5.0\r
58 Content-Type: text/html; charset=iso-8859-1\r
59 \r
60 HTTP/1.1 200 OK
61 Date: Thu, 09 Nov 2010 14:49:00 GMT
62 Content-Length: 7
63 Connection: close
64 Content-Type: text/html
65 Funny-head: yesyes
66
67 daniel
68 </datacheck>
69 </reply>
70
71 # Client-side
72 <client>
73 <server>
74 http
75 </server>
76 <features>
77 NTLM
78 !SSPI
79 debug
80 </features>
81  <name>
82 HTTP proxy CONNECT auth NTLM
83  </name>
84  <setenv>
85 # we force our own host name, in order to make the test machine independent
86 CURL_GETHOSTNAME=curlhost
87 # we try to use the LD_PRELOAD hack, if not a debug build
88 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
89  </setenv>
90  <command>
91 http://test.remote.example.com.209:%HTTPPORT/path/2090002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel
92 </command>
93 <precheck>
94 chkhostname curlhost
95 </precheck>
96 </client>
97
98 # Verify data after the test has been "shot"
99 <verify>
100 <strip>
101 ^User-Agent: curl/.*
102 </strip>
103 <protocol>
104 CONNECT test.remote.example.com.209:%HTTPPORT HTTP/1.1\r
105 Host: test.remote.example.com.209:%HTTPPORT\r
106 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
107 Proxy-Connection: Keep-Alive\r
108 \r
109 CONNECT test.remote.example.com.209:%HTTPPORT HTTP/1.1\r
110 Host: test.remote.example.com.209:%HTTPPORT\r
111 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==\r
112 Proxy-Connection: Keep-Alive\r
113 \r
114 GET /path/2090002 HTTP/1.1\r
115 User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4\r
116 Host: test.remote.example.com.209:%HTTPPORT\r
117 Accept: */*\r
118 \r
119 </protocol>
120 </verify>
121 </testcase>