Imported Upstream version 7.44.0
[platform/upstream/curl.git] / tests / data / test169
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP proxy
7 HTTP proxy NTLM auth
8 HTTP 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>
17 HTTP/1.1 407 Authorization Required to proxy me my dear swsclose\r
18 Proxy-Authenticate: NTLM\r
19 \r
20 And you should ignore this data.
21 </data>
22
23 # then this is returned since we get no server-auth
24 <data1000>
25 HTTP/1.1 200 Authorizated fine\r
26 Content-Length: 27\r
27 \r
28 Welcome to the end station
29 </data1000>
30
31 <data1001>
32 HTTP/1.1 407 NTLM type-1 received sending back type-2\r
33 Server: Microsoft-IIS/5.0\r
34 Content-Length: 34\r
35 Content-Type: text/html; charset=iso-8859-1\r
36 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
37 \r
38 This 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>
44 HTTP/1.1 401 You now need to authenticate with the host\r
45 Server: Microsoft-IIS/5.0\r
46 WWW-Authenticate: Digest realm="r e a l m", nonce="abcdef"\r
47 Content-Length: 46\r
48 Content-Type: text/html; charset=iso-8859-1\r
49 \r
50 We have not authenticated with the server yet
51 </data1002>
52
53 <datacheck>
54 HTTP/1.1 407 NTLM type-1 received sending back type-2\r
55 Server: Microsoft-IIS/5.0\r
56 Content-Length: 34\r
57 Content-Type: text/html; charset=iso-8859-1\r
58 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
59 \r
60 HTTP/1.1 401 You now need to authenticate with the host\r
61 Server: Microsoft-IIS/5.0\r
62 WWW-Authenticate: Digest realm="r e a l m", nonce="abcdef"\r
63 Content-Length: 46\r
64 Content-Type: text/html; charset=iso-8859-1\r
65 \r
66 HTTP/1.1 200 Authorizated fine\r
67 Content-Length: 27\r
68 \r
69 Welcome to the end station
70 </datacheck>
71 </reply>
72
73 # Client-side
74 <client>
75 <server>
76 http
77 </server>
78 <features>
79 NTLM
80 !SSPI
81 debug
82 </features>
83  <name>
84 HTTP with proxy-requiring-NTLM to site-requiring-Digest
85  </name>
86  <setenv>
87 # we force our own host name, in order to make the test machine independent
88 CURL_GETHOSTNAME=curlhost
89 # we try to use the LD_PRELOAD hack, if not a debug build
90 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
91  </setenv>
92  <command>
93 http://data.from.server.requiring.digest.hohoho.com/169 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --digest --user digest:alot
94 </command>
95 <precheck>
96 chkhostname curlhost
97 </precheck>
98 </client>
99
100 # Verify data after the test has been "shot"
101 <verify>
102 <strip>
103 ^User-Agent: curl/.*
104 </strip>
105 <protocol>
106 GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1\r
107 Host: data.from.server.requiring.digest.hohoho.com\r
108 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
109 User-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\r
110 Accept: */*\r
111 Proxy-Connection: Keep-Alive\r
112 \r
113 GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1\r
114 Host: data.from.server.requiring.digest.hohoho.com\r
115 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==\r
116 User-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\r
117 Accept: */*\r
118 Proxy-Connection: Keep-Alive\r
119 \r
120 GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1\r
121 Host: data.from.server.requiring.digest.hohoho.com\r
122 Authorization: Digest username="digest", realm="r e a l m", nonce="abcdef", uri="/169", response="95d48591985a03c4b49cb962aa7bd3e6"\r
123 User-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\r
124 Accept: */*\r
125 Proxy-Connection: Keep-Alive\r
126 \r
127 </protocol>
128 </verify>
129 </testcase>