f50664d8f2fcfa03bbd3cd21cc9a60da6e1543c9
[platform/upstream/curl.git] / tests / data / test590
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP POST
6 POST callback
7 HTTP proxy
8 HTTP proxy NTLM auth
9 </keywords>
10 </info>
11 # Server-side
12 <reply>
13
14 <data>
15 HTTP/1.1 407 Authorization Required swsclose\r
16 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
17 Proxy-Authenticate: Negotiate\r
18 Proxy-Authenticate: NTLM\r
19 Content-Type: text/html; charset=iso-8859-1\r
20 Connection: close\r
21 \r
22 This is not the real page
23 </data>
24
25 # this is returned first since we get no proxy-auth
26 <data1001>
27 HTTP/1.1 407 Authorization Required to proxy me my dear\r
28 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
29 Content-Length: 34\r
30 \r
31 Hey 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>
37 HTTP/1.1 200 Things are fine in proxy land swsclose\r
38 Server: Microsoft-IIS/5.0\r
39 Content-Type: text/html; charset=iso-8859-1\r
40 Content-Length: 42\r
41 \r
42 Contents of that page you requested, sir.
43 </data1002>
44
45 <datacheck>
46 HTTP/1.1 407 Authorization Required swsclose\r
47 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
48 Proxy-Authenticate: Negotiate\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 # tool to use
72 <tool>
73 lib590
74 </tool>
75 <features>
76 NTLM
77 </features>
78  <name>
79 HTTP proxy offers Negotiate+NTLM, use only NTLM
80  </name>
81  <setenv>
82 # we force our own host name, in order to make the test machine independent
83 CURL_GETHOSTNAME=curlhost
84 # we try to use the LD_PRELOAD hack, if not a debug build
85 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
86  </setenv>
87  <command>
88 http://test.remote.example.com/path/590 http://%HOSTIP:%HTTPPORT
89 </command>
90 <precheck>
91 chkhostname curlhost
92 </precheck>
93 </client>
94
95 # Verify data after the test has been "shot"
96 <verify>
97 <strip>
98 ^User-Agent: curl/.*
99 </strip>
100 <protocol>
101 GET http://test.remote.example.com/path/590 HTTP/1.1\r
102 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
103 Host: test.remote.example.com\r
104 Accept: */*\r
105 Proxy-Connection: Keep-Alive\r
106 \r
107 GET http://test.remote.example.com/path/590 HTTP/1.1\r
108 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
109 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
110 Host: test.remote.example.com\r
111 Accept: */*\r
112 Proxy-Connection: Keep-Alive\r
113 \r
114 GET http://test.remote.example.com/path/590 HTTP/1.1\r
115 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAAAgACAHAAAAAIAAgAcgAAAAAAAAAAAAAABoKBAAQt1KW5CgG4YdWWcfXyfXBz1ZMCzYp37xYjBiAizmw58O6eQS7yR66eqYGWeSwl9W1lY3VybGhvc3Q=\r
116 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
117 Host: test.remote.example.com\r
118 Accept: */*\r
119 Proxy-Connection: Keep-Alive\r
120 \r
121 </protocol>
122 </verify>
123 </testcase>