• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP CONNECT
7HTTP proxy
8HTTP proxy NTLM auth
9chunked Transfer-Encoding
10</keywords>
11</info>
12
13# Server-side
14<reply>
15<servercmd>
16connection-monitor
17</servercmd>
18
19# this is returned first since we get no proxy-auth
20<connect1001>
21HTTP/1.1 407 Authorization Required to proxy me my dear
22Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
23Transfer-Encoding: chunked
24
2520
26And you should ignore this data.
27FA0
28XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX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XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
290
30
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
64Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
65Transfer-Encoding: chunked
66
67HTTP/1.1 200 Things are fine in proxy land
68Server: Microsoft-IIS/5.0
69Content-Type: text/html; charset=iso-8859-1
70
71HTTP/1.1 200 OK
72Date: Thu, 09 Nov 2010 14:49:00 GMT
73Content-Length: 7
74Connection: close
75Content-Type: text/html
76Funny-head: yesyes
77
78daniel
79</datacheck>
80</reply>
81
82# Client-side
83<client>
84<server>
85http
86</server>
87<features>
88NTLM
89SSL
90!SSPI
91debug
92proxy
93</features>
94 <name>
95HTTP proxy CONNECT auth NTLM with chunked-encoded 407 response
96 </name>
97 <setenv>
98# we force our own host name, in order to make the test machine independent
99CURL_GETHOSTNAME=curlhost
100# we try to use the LD_PRELOAD hack, if not a debug build
101LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
102 </setenv>
103 <command>
104http://test.remote.example.com.1008:%HTTPPORT/path/10080002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel
105</command>
106<precheck>
107chkhostname curlhost
108</precheck>
109</client>
110
111# Verify data after the test has been "shot"
112<verify>
113<protocol>
114CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1
115Host: test.remote.example.com.1008:%HTTPPORT
116Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
117User-Agent: curl/%VERSION
118Proxy-Connection: Keep-Alive
119
120CONNECT test.remote.example.com.1008:%HTTPPORT HTTP/1.1
121Host: test.remote.example.com.1008:%HTTPPORT
122Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=
123User-Agent: curl/%VERSION
124Proxy-Connection: Keep-Alive
125
126GET /path/10080002 HTTP/1.1
127Host: test.remote.example.com.1008:%HTTPPORT
128User-Agent: curl/%VERSION
129Accept: */*
130
131[DISCONNECT]
132</protocol>
133</verify>
134</testcase>
135