Imported Upstream version 7.53.1
[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 Content-Length: 33\r
20 \r
21 And you should ignore this data.
22 </connect1001>
23
24 # This is supposed to be returned when the server gets the second
25 # Authorization: NTLM line passed-in from the client
26 <connect1002>
27 HTTP/1.1 200 Things are fine in proxy land\r
28 Server: Microsoft-IIS/5.0\r
29 Content-Type: text/html; charset=iso-8859-1\r
30 \r
31 </connect1002>
32
33 # this is returned when we get a GET!
34 <data2>
35 HTTP/1.1 200 OK
36 Date: Thu, 09 Nov 2010 14:49:00 GMT
37 Content-Length: 7
38 Connection: close
39 Content-Type: text/html
40 Funny-head: yesyes
41
42 daniel
43 </data2>
44
45 # then this is returned when we get proxy-auth
46 <data1000>
47 HTTP/1.1 200 OK swsbounce\r
48 Server: no
49 \r
50 Nice proxy auth sir!
51 </data1000>
52
53 <datacheck>
54 HTTP/1.1 407 Authorization Required to proxy me my dear\r
55 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
56 Content-Length: 33\r
57 \r
58 HTTP/1.1 200 Things are fine in proxy land\r
59 Server: Microsoft-IIS/5.0\r
60 Content-Type: text/html; charset=iso-8859-1\r
61 \r
62 HTTP/1.1 200 OK
63 Date: Thu, 09 Nov 2010 14:49:00 GMT
64 Content-Length: 7
65 Connection: close
66 Content-Type: text/html
67 Funny-head: yesyes
68
69 daniel
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 1.0 proxy CONNECT auth NTLM and then POST
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://test.remote.example.com.213:%HTTPPORT/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit"
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 nonewline="yes">
106 CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0\r
107 Host: test.remote.example.com.213:%HTTPPORT\r
108 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
109 Proxy-Connection: Keep-Alive\r
110 \r
111 CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0\r
112 Host: test.remote.example.com.213:%HTTPPORT\r
113 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==\r
114 Proxy-Connection: Keep-Alive\r
115 \r
116 POST /path/2130002 HTTP/1.1\r
117 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
118 Host: test.remote.example.com.213:%HTTPPORT\r
119 Accept: */*\r
120 Content-Length: 6\r
121 Content-Type: application/x-www-form-urlencoded\r
122 \r
123 postit
124 </protocol>
125 </verify>
126 </testcase>