1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6POST callback
7HTTP proxy
8HTTP proxy NTLM auth
9</keywords>
10</info>
11# Server-side
12<reply>
13
14<data>
15HTTP/1.1 407 Authorization Required swsclose
16Server: Apache/1.3.27 (Darwin) PHP/4.1.2
17Proxy-Authenticate: Negotiate
18Proxy-Authenticate: NTLM
19Content-Type: text/html; charset=iso-8859-1
20Connection: close
21
22This is not the real page
23</data>
24
25# this is returned first since we get no proxy-auth
26<data1001>
27HTTP/1.1 407 Authorization Required to proxy me my dear
28Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
29Content-Length: 34
30
31Hey you, authenticate or go away!
32</data1001>
33
34# This is supposed to be returned when the server gets the second
35# Authorization: NTLM line passed-in from the client
36<data1002>
37HTTP/1.1 200 Things are fine in proxy land swsclose
38Server: Microsoft-IIS/5.0
39Content-Type: text/html; charset=iso-8859-1
40Content-Length: 42
41
42Contents of that page you requested, sir.
43</data1002>
44
45<datacheck>
46HTTP/1.1 407 Authorization Required swsclose
47Server: Apache/1.3.27 (Darwin) PHP/4.1.2
48Proxy-Authenticate: Negotiate
49Proxy-Authenticate: NTLM
50Content-Type: text/html; charset=iso-8859-1
51Connection: close
52
53HTTP/1.1 407 Authorization Required to proxy me my dear
54Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
55Content-Length: 34
56
57HTTP/1.1 200 Things are fine in proxy land swsclose
58Server: Microsoft-IIS/5.0
59Content-Type: text/html; charset=iso-8859-1
60Content-Length: 42
61
62Contents of that page you requested, sir.
63</datacheck>
64</reply>
65
66# Client-side
67<client>
68<server>
69http
70</server>
71# tool to use
72<tool>
73lib590
74</tool>
75<features>
76NTLM
77!SSPI
78</features>
79 <name>
80HTTP proxy offers Negotiate+NTLM, use only NTLM
81 </name>
82 <setenv>
83# we force our own host name, in order to make the test machine independent
84CURL_GETHOSTNAME=curlhost
85# we try to use the LD_PRELOAD hack, if not a debug build
86LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
87 </setenv>
88 <command>
89http://test.remote.example.com/path/590 http://%HOSTIP:%HTTPPORT
90</command>
91<precheck>
92chkhostname curlhost
93</precheck>
94</client>
95
96# Verify data after the test has been "shot"
97<verify>
98<strip>
99^User-Agent: curl/.*
100</strip>
101<protocol>
102GET http://test.remote.example.com/path/590 HTTP/1.1
103User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
104Host: test.remote.example.com
105Accept: */*
106Proxy-Connection: Keep-Alive
107
108GET http://test.remote.example.com/path/590 HTTP/1.1
109Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
110User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
111Host: test.remote.example.com
112Accept: */*
113Proxy-Connection: Keep-Alive
114
115GET http://test.remote.example.com/path/590 HTTP/1.1
116Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAAAgACAPYAAAAIAAgA+AAAAAAAAAAAAAAABoKBAPSaTGsssJTH2lfYZx38iW8xMjM0NTY3OJVl3xUrxVqh2Mg+GUvccE0BAQAAAAAAAACAPtXesZ0BMTIzNDU2NzgAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAbWVjdXJsaG9zdA==
117User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
118Host: test.remote.example.com
119Accept: */*
120Proxy-Connection: Keep-Alive
121
122</protocol>
123</verify>
124</testcase>
125