5c14aa875666b9b79b23a8d5994bdeec8451b4ba
[platform/upstream/curl.git] / tests / data / test213
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP POST
6 HTTP CONNECT
7 HTTP proxy
8 HTTP proxy NTLM auth
9 </keywords>
10 </info>
11
12 # Server-side
13 <reply>
14
15 # this is returned first since we get no proxy-auth
16 <connect1001>
17 HTTP/1.1 407 Authorization Required to proxy me my dear\r
18 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
19 \r
20 And you should ignore this data.
21 </connect1001>
22
23 # This is supposed to be returned when the server gets the second
24 # Authorization: NTLM line passed-in from the client
25 <connect1002>
26 HTTP/1.1 200 Things are fine in proxy land\r
27 Server: Microsoft-IIS/5.0\r
28 Content-Type: text/html; charset=iso-8859-1\r
29 \r
30 </connect1002>
31
32 # this is returned when we get a GET!
33 <data2>
34 HTTP/1.1 200 OK
35 Date: Thu, 09 Nov 2010 14:49:00 GMT
36 Content-Length: 7
37 Connection: close
38 Content-Type: text/html
39 Funny-head: yesyes
40
41 daniel
42 </data2>
43
44 # then this is returned when we get proxy-auth
45 <data1000>
46 HTTP/1.1 200 OK swsbounce\r
47 Server: no
48 \r
49 Nice proxy auth sir!
50 </data1000>
51
52 <datacheck>
53 HTTP/1.1 407 Authorization Required to proxy me my dear\r
54 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
55 \r
56 HTTP/1.1 200 Things are fine in proxy land\r
57 Server: Microsoft-IIS/5.0\r
58 Content-Type: text/html; charset=iso-8859-1\r
59 \r
60 HTTP/1.1 200 OK
61 Date: Thu, 09 Nov 2010 14:49:00 GMT
62 Content-Length: 7
63 Connection: close
64 Content-Type: text/html
65 Funny-head: yesyes
66
67 daniel
68 </datacheck>
69 </reply>
70
71 # Client-side
72 <client>
73 <server>
74 http
75 </server>
76 <features>
77 NTLM
78 </features>
79  <name>
80 HTTP 1.0 proxy CONNECT auth NTLM and then POST
81  </name>
82  <setenv>
83 # we force our own host name, in order to make the test machine independent
84 CURL_GETHOSTNAME=curlhost
85 # we try to use the LD_PRELOAD hack, if not a debug build
86 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
87  </setenv>
88  <command>
89 http://test.remote.example.com.213:%HTTPPORT/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit"
90 </command>
91 <precheck>
92 chkhostname 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 nonewline="yes">
102 CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0\r
103 Host: test.remote.example.com.213:%HTTPPORT\r
104 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
105 Proxy-Connection: Keep-Alive\r
106 \r
107 CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0\r
108 Host: test.remote.example.com.213:%HTTPPORT\r
109 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=\r
110 Proxy-Connection: Keep-Alive\r
111 \r
112 POST /path/2130002 HTTP/1.1\r
113 User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4\r
114 Host: test.remote.example.com.213:%HTTPPORT\r
115 Accept: */*\r
116 Content-Length: 6\r
117 Content-Type: application/x-www-form-urlencoded\r
118 \r
119 postit
120 </protocol>
121 </verify>
122 </testcase>