xref: /curl/tests/data/test548 (revision 5a41abef)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6HTTP proxy
7HTTP proxy NTLM auth
8NTLM
9</keywords>
10</info>
11
12# Server-side
13<reply>
14
15<data>
16HTTP/1.1 407 Authorization Required swsclose
17Server: Apache/1.3.27 (Darwin) PHP/4.1.2
18Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
19Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
20Proxy-Authenticate: NTLM
21Content-Type: text/html; charset=iso-8859-1
22Connection: close
23
24This is not the real page
25</data>
26
27# this is returned first since we get no proxy-auth
28<data1001>
29HTTP/1.1 407 Authorization Required to proxy me my dear
30Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
31Content-Length: 34
32
33Hey you, authenticate or go away!
34</data1001>
35
36# This is supposed to be returned when the server gets the second
37# Authorization: NTLM line passed-in from the client
38<data1002>
39HTTP/1.1 200 Things are fine in proxy land swsclose
40Server: Microsoft-IIS/5.0
41Content-Type: text/html; charset=iso-8859-1
42Content-Length: 42
43
44Contents of that page you requested, sir.
45</data1002>
46
47<datacheck>
48HTTP/1.1 407 Authorization Required swsclose
49Server: Apache/1.3.27 (Darwin) PHP/4.1.2
50Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
51Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
52Proxy-Authenticate: NTLM
53Content-Type: text/html; charset=iso-8859-1
54Connection: close
55
56HTTP/1.1 407 Authorization Required to proxy me my dear
57Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
58Content-Length: 34
59
60HTTP/1.1 200 Things are fine in proxy land swsclose
61Server: Microsoft-IIS/5.0
62Content-Type: text/html; charset=iso-8859-1
63Content-Length: 42
64
65Contents of that page you requested, sir.
66</datacheck>
67</reply>
68
69# Client-side
70<client>
71<server>
72http
73</server>
74# tool to use
75<tool>
76lib%TESTNUMBER
77</tool>
78<features>
79NTLM
80SSL
81!SSPI
82proxy
83</features>
84<name>
85HTTP proxy auth NTLM with POST data from CURLOPT_POSTFIELDS
86</name>
87<command>
88http://test.remote.example.com/path/%TESTNUMBER http://%HOSTIP:%HTTPPORT testuser:testpass
89</command>
90</client>
91
92# Verify data after the test has been "shot"
93<verify>
94<protocol>
95POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1
96Host: test.remote.example.com
97Accept: */*
98Proxy-Connection: Keep-Alive
99Content-Length: 36
100Content-Type: application/x-www-form-urlencoded
101
102this is the blurb we want to upload
103POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1
104Host: test.remote.example.com
105Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
106Accept: */*
107Proxy-Connection: Keep-Alive
108Content-Length: 0
109Content-Type: application/x-www-form-urlencoded
110
111POST http://test.remote.example.com/path/%TESTNUMBER HTTP/1.1
112Host: test.remote.example.com
113Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
114Accept: */*
115Proxy-Connection: Keep-Alive
116Content-Length: 36
117Content-Type: application/x-www-form-urlencoded
118
119this is the blurb we want to upload
120</protocol>
121</verify>
122</testcase>
123