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