blob: c6db8964eee01e4ff1981856e173d435d1118dda [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6HTTP CONNECT
7HTTP proxy
8HTTP proxy NTLM auth
9NTLM
10</keywords>
11</info>
12
13# Server-side
14<reply>
15
16# this is returned first since we get no proxy-auth
17<connect1001>
18HTTP/1.0 407 Authorization Required to proxy me my dear
19Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
20Content-Length: 1033
21
22And you should ignore this data.
23QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
24</connect1001>
25
26# This is supposed to be returned when the server gets the second
27# Authorization: NTLM line passed-in from the client
28<connect1002>
29HTTP/1.1 200 Things are fine in proxy land
30Server: Microsoft-IIS/5.0
31Content-Type: text/html; charset=iso-8859-1
32
33</connect1002>
34
35# this is returned when we get a GET!
36<data2>
37HTTP/1.1 200 OK
38Date: Tue, 09 Nov 2010 14:49:00 GMT
39Content-Length: 7
40Connection: close
41Content-Type: text/html
42Funny-head: yesyes
43
44daniel
45</data2>
46
47# then this is returned when we get proxy-auth
48<data1000>
49HTTP/1.1 200 OK swsbounce
50Server: no
51
52Nice proxy auth sir!
53</data1000>
54
55<datacheck>
56HTTP/1.0 407 Authorization Required to proxy me my dear
57Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
58Content-Length: 1033
59
60HTTP/1.1 200 Things are fine in proxy land
61Server: Microsoft-IIS/5.0
62Content-Type: text/html; charset=iso-8859-1
63
64HTTP/1.1 200 OK
65Date: Tue, 09 Nov 2010 14:49:00 GMT
66Content-Length: 7
67Connection: close
68Content-Type: text/html
69Funny-head: yesyes
70
71daniel
72</datacheck>
73</reply>
74
75# Client-side
76<client>
77<server>
78http
79</server>
80<features>
81NTLM
82SSL
83!SSPI
84proxy
85</features>
86<name>
87HTTP proxy CONNECT auth NTLM and then POST, response-body in the 407
88</name>
89<command>
90http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit"
91</command>
92</client>
93
94# Verify data after the test has been "shot"
95<verify>
96<protocol nonewline="yes">
97CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
98Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
99Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
100User-Agent: curl/%VERSION
101Proxy-Connection: Keep-Alive
102
103CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
104Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
105Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
106User-Agent: curl/%VERSION
107Proxy-Connection: Keep-Alive
108
109POST /path/%TESTNUMBER0002 HTTP/1.1
110Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
111User-Agent: curl/%VERSION
112Accept: */*
113Content-Length: 6
114Content-Type: application/x-www-form-urlencoded
115
116postit
117</protocol>
118</verify>
119</testcase>