1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP proxy
7HTTP proxy NTLM auth
8HTTP Digest auth
9</keywords>
10</info>
11
12# Server-side
13<reply>
14
15# this is returned first since we get no proxy-auth
16<data>
17HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
18Proxy-Authenticate: NTLM
19
20And you should ignore this data.
21</data>
22
23# then this is returned since we get no server-auth
24<data1000>
25HTTP/1.1 200 Authorizated fine
26Content-Length: 27
27
28Welcome to the end station
29</data1000>
30
31<data1001>
32HTTP/1.1 407 NTLM type-1 received sending back type-2
33Server: Microsoft-IIS/5.0
34Content-Length: 34
35Content-Type: text/html; charset=iso-8859-1
36Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
37
38This is not the real page either!
39</data1001>
40
41# This is supposed to be returned when the server gets the second
42# Authorization: NTLM line passed-in from the client
43<data1002>
44HTTP/1.1 401 You now need to authenticate with the host
45Server: Microsoft-IIS/5.0
46WWW-Authenticate: Digest realm="r e a l m", nonce="abcdef"
47Content-Length: 46
48Content-Type: text/html; charset=iso-8859-1
49
50We have not authenticated with the server yet
51</data1002>
52
53<datacheck>
54HTTP/1.1 407 NTLM type-1 received sending back type-2
55Server: Microsoft-IIS/5.0
56Content-Length: 34
57Content-Type: text/html; charset=iso-8859-1
58Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
59
60HTTP/1.1 401 You now need to authenticate with the host
61Server: Microsoft-IIS/5.0
62WWW-Authenticate: Digest realm="r e a l m", nonce="abcdef"
63Content-Length: 46
64Content-Type: text/html; charset=iso-8859-1
65
66HTTP/1.1 200 Authorizated fine
67Content-Length: 27
68
69Welcome to the end station
70</datacheck>
71</reply>
72
73# Client-side
74<client>
75<server>
76http
77</server>
78<features>
79NTLM
80</features>
81 <name>
82HTTP with proxy-requiring-NTLM to site-requiring-Digest
83 </name>
84 <setenv>
85# we force our own host name, in order to make the test machine independent
86CURL_GETHOSTNAME=curlhost
87# we try to use the LD_PRELOAD hack, if not a debug build
88LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
89 </setenv>
90 <command>
91http://data.from.server.requiring.digest.hohoho.com/169 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm --digest --user digest:alot
92</command>
93<precheck>
94chkhostname 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>
104GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
105Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
106User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
107Host: data.from.server.requiring.digest.hohoho.com
108Accept: */*
109Proxy-Connection: Keep-Alive
110
111GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
112Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAAAwADAHAAAAAIAAgAcwAAAAAAAAAAAAAABoKBAIP6B+XVQ6vQsx3DfDXUVhd9436GAxPu0IYcl2Z7LxHmNeOAWQ+vxUmhuCFJBUgXCWZvb2N1cmxob3N0
113User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
114Host: data.from.server.requiring.digest.hohoho.com
115Accept: */*
116Proxy-Connection: Keep-Alive
117
118GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
119Authorization: Digest username="digest", realm="r e a l m", nonce="abcdef", uri="/169", response="95d48591985a03c4b49cb962aa7bd3e6"
120User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
121Host: data.from.server.requiring.digest.hohoho.com
122Accept: */*
123Proxy-Connection: Keep-Alive
124
125</protocol>
126</verify>
127</testcase>
128