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