NTLM2 session response support
[platform/upstream/curl.git] / tests / data / test243
1 <info>
2 <keywords>
3 HTTP
4 HTTP GET
5 --proxy-anyauth
6 HTTP proxy NTLM
7 </keywords>
8 </info>
9 # Server-side
10 <reply>
11
12 <data>
13 HTTP/1.1 407 Authorization Required swsclose\r
14 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
15 Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"\r
16 Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"\r
17 Proxy-Authenticate: NTLM\r
18 Content-Type: text/html; charset=iso-8859-1\r
19 Connection: close\r
20 \r
21 This is not the real page
22 </data>
23
24 # this is returned first since we get no proxy-auth
25 <data1001>
26 HTTP/1.1 407 Authorization Required to proxy me my dear\r
27 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
28 Content-Length: 34\r
29 \r
30 Hey you, authenticate or go away!
31 </data1001>
32
33 # This is supposed to be returned when the server gets the second
34 # Authorization: NTLM line passed-in from the client
35 <data1002>
36 HTTP/1.1 200 Things are fine in proxy land swsclose\r
37 Server: Microsoft-IIS/5.0\r
38 Content-Type: text/html; charset=iso-8859-1\r
39 Content-Length; 42\r
40 \r
41 Contents of that page you requested, sir.
42 </data1002>
43
44 <datacheck>
45 HTTP/1.1 407 Authorization Required swsclose\r
46 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
47 Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"\r
48 Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"\r
49 Proxy-Authenticate: NTLM\r
50 Content-Type: text/html; charset=iso-8859-1\r
51 Connection: close\r
52 \r
53 HTTP/1.1 407 Authorization Required to proxy me my dear\r
54 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
55 Content-Length: 34\r
56 \r
57 HTTP/1.1 200 Things are fine in proxy land swsclose\r
58 Server: Microsoft-IIS/5.0\r
59 Content-Type: text/html; charset=iso-8859-1\r
60 Content-Length; 42\r
61 \r
62 Contents of that page you requested, sir.
63 </datacheck>
64 </reply>
65
66 # Client-side
67 <client>
68 <server>
69 http
70 </server>
71 <features>
72 NTLM
73 </features>
74  <name>
75 HTTP POST with --proxy-anyauth, picking NTLM
76  </name>
77  <command>
78 http://%HOSTIP:%HTTPPORT/243 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth -d "postit"
79 </command>
80 </client>
81
82 # Verify data after the test has been "shot"
83 <verify>
84 <strip>
85 ^User-Agent: curl/.*
86 </strip>
87 # We strip off a large chunk of the type-2 NTLM message since it depends on
88 # the local host name and thus differs on different machines!
89 <strippart>
90 s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
91 </strippart)
92 <protocol nonewline=yes>
93 POST http://127.0.0.1:8990/243 HTTP/1.1\r
94 User-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\r
95 Host: 127.0.0.1:8990\r
96 Pragma: no-cache\r
97 Accept: */*\r
98 Proxy-Connection: Keep-Alive\r
99 Content-Length: 6\r
100 Content-Type: application/x-www-form-urlencoded\r
101 \r
102 postitPOST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1\r
103 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
104 User-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\r
105 Host: %HOSTIP:%HTTPPORT\r
106 Pragma: no-cache\r
107 Accept: */*\r
108 Proxy-Connection: Keep-Alive\r
109 Content-Length: 0\r
110 Content-Type: application/x-www-form-urlencoded\r
111 \r
112 POST http://127.0.0.1:8990/243 HTTP/1.1\r
113 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
114 User-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\r
115 Host: 127.0.0.1:8990\r
116 Pragma: no-cache\r
117 Accept: */*\r
118 Proxy-Connection: Keep-Alive\r
119 Content-Length: 6\r
120 Content-Type: application/x-www-form-urlencoded\r
121 \r
122 postit
123 </protocol>
124 </verify>