18d20a60ac2290f3efc2a79613cb626ecde08f8d
[external/curl.git] / tests / data / test265
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 <data1001>
17 HTTP/1.0 407 Authorization Required to proxy me my dear\r
18 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
19 Content-Length: 1033\r
20 \r
21 And you should ignore this data.
22 QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQz
23 </data1001>
24
25 # This is supposed to be returned when the server gets the second
26 # Authorization: NTLM line passed-in from the client
27 <data1002>
28 HTTP/1.1 200 Things are fine in proxy land\r
29 Server: Microsoft-IIS/5.0\r
30 Content-Type: text/html; charset=iso-8859-1\r
31 \r
32 </data1002>
33
34 # this is returned when we get a GET!
35 <data2>
36 HTTP/1.1 200 OK
37 Date: Thu, 09 Nov 2010 14:49:00 GMT
38 Content-Length: 7
39 Connection: close
40 Content-Type: text/html
41 Funny-head: yesyes
42
43 daniel
44 </data2>
45
46 # then this is returned when we get proxy-auth
47 <data1000>
48 HTTP/1.1 200 OK swsbounce\r
49 Server: no
50 \r
51 Nice proxy auth sir!
52 </data1000>
53
54 <datacheck>
55 HTTP/1.0 407 Authorization Required to proxy me my dear\r
56 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
57 Content-Length: 1033\r
58 \r
59 HTTP/1.1 200 Things are fine in proxy land\r
60 Server: Microsoft-IIS/5.0\r
61 Content-Type: text/html; charset=iso-8859-1\r
62 \r
63 HTTP/1.1 200 OK
64 Date: Thu, 09 Nov 2010 14:49:00 GMT
65 Content-Length: 7
66 Connection: close
67 Content-Type: text/html
68 Funny-head: yesyes
69
70 daniel
71 </datacheck>
72 </reply>
73
74 # Client-side
75 <client>
76 <server>
77 http
78 </server>
79 <features>
80 NTLM
81 </features>
82  <name>
83 HTTP proxy CONNECT auth NTLM and then POST, response-body in the 407
84  </name>
85  <setenv>
86 # we force our own host name, in order to make the test machine independent
87 CURL_GETHOSTNAME=curlhost
88 # we try to use the LD_PRELOAD hack, if not a debug build
89 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
90  </setenv>
91  <command>
92 http://test.remote.haxx.se:265/path/2650002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit"
93 </command>
94 <precheck>
95 chkhostname curlhost
96 </precheck>
97 </client>
98
99 # Verify data after the test has been "shot"
100 <verify>
101 <strip>
102 ^User-Agent: curl/.*
103 </strip>
104 <protocol nonewline="yes">
105 CONNECT test.remote.haxx.se:265 HTTP/1.1\r
106 Host: test.remote.haxx.se:265\r
107 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
108 Proxy-Connection: Keep-Alive\r
109 \r
110 CONNECT test.remote.haxx.se:265 HTTP/1.1\r
111 Host: test.remote.haxx.se:265\r
112 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=\r
113 Proxy-Connection: Keep-Alive\r
114 \r
115 POST /path/2650002 HTTP/1.1\r
116 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
117 Host: test.remote.haxx.se:265\r
118 Accept: */*\r
119 Content-Length: 6\r
120 Content-Type: application/x-www-form-urlencoded\r
121 \r
122 postit
123 </protocol>
124 </verify>
125 </testcase>