• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6HTTP CONNECT
7HTTP proxy
8HTTP 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>
17HTTP/1.1 407 Authorization Required to proxy me my dear
18Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
19Content-Length: 33
20
21And you should ignore this data.
22</connect1001>
23
24# This is supposed to be returned when the server gets the second
25# Authorization: NTLM line passed-in from the client
26<connect1002>
27HTTP/1.1 200 Things are fine in proxy land
28Server: Microsoft-IIS/5.0
29Content-Type: text/html; charset=iso-8859-1
30
31</connect1002>
32
33# this is returned when we get a GET!
34<data2>
35HTTP/1.1 200 OK
36Date: Thu, 09 Nov 2010 14:49:00 GMT
37Content-Length: 7
38Connection: close
39Content-Type: text/html
40Funny-head: yesyes
41
42daniel
43</data2>
44
45# then this is returned when we get proxy-auth
46<data1000>
47HTTP/1.1 200 OK swsbounce
48Server: no
49
50Nice proxy auth sir!
51</data1000>
52
53<datacheck>
54HTTP/1.1 407 Authorization Required to proxy me my dear
55Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
56Content-Length: 33
57
58HTTP/1.1 200 Things are fine in proxy land
59Server: Microsoft-IIS/5.0
60Content-Type: text/html; charset=iso-8859-1
61
62HTTP/1.1 200 OK
63Date: Thu, 09 Nov 2010 14:49:00 GMT
64Content-Length: 7
65Connection: close
66Content-Type: text/html
67Funny-head: yesyes
68
69daniel
70</datacheck>
71</reply>
72
73# Client-side
74<client>
75<server>
76http
77</server>
78<features>
79NTLM
80SSL
81!SSPI
82debug
83proxy
84</features>
85 <name>
86HTTP 1.0 proxy CONNECT auth NTLM and then POST
87 </name>
88 <setenv>
89# we force our own host name, in order to make the test machine independent
90CURL_GETHOSTNAME=curlhost
91# we try to use the LD_PRELOAD hack, if not a debug build
92LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
93 </setenv>
94 <command>
95http://test.remote.example.com.213:%HTTPPORT/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit"
96</command>
97<precheck>
98chkhostname curlhost
99</precheck>
100</client>
101
102# Verify data after the test has been "shot"
103<verify>
104<protocol nonewline="yes">
105CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0
106Host: test.remote.example.com.213:%HTTPPORT
107Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
108User-Agent: curl/%VERSION
109Proxy-Connection: Keep-Alive
110
111CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0
112Host: test.remote.example.com.213:%HTTPPORT
113Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=
114User-Agent: curl/%VERSION
115Proxy-Connection: Keep-Alive
116
117POST /path/2130002 HTTP/1.1
118Host: test.remote.example.com.213:%HTTPPORT
119User-Agent: curl/%VERSION
120Accept: */*
121Content-Length: 6
122Content-Type: application/x-www-form-urlencoded
123
124postit
125</protocol>
126</verify>
127</testcase>
128