• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6HTTP proxy
7HTTP proxy NTLM auth
8</keywords>
9</info>
10
11# Server-side
12<reply>
13
14# this is returned first since we get no proxy-auth
15<data1001>
16HTTP/1.1 407 Authorization Required to proxy me my dear
17Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
18Content-Length: 34
19
20Hey you, authenticate or go away!
21</data1001>
22
23# This is supposed to be returned when the server gets the second
24# Authorization: NTLM line passed-in from the client
25<data1002>
26HTTP/1.1 200 Things are fine in proxy land swsclose
27Server: Microsoft-IIS/5.0
28Content-Type: text/html; charset=iso-8859-1
29Content-Length: 42
30
31Contents of that page you requested, sir.
32</data1002>
33
34<datacheck>
35HTTP/1.1 407 Authorization Required to proxy me my dear
36Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
37Content-Length: 34
38
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</datacheck>
46</reply>
47
48# Client-side
49<client>
50<server>
51http
52</server>
53<features>
54NTLM
55SSL
56!SSPI
57debug
58proxy
59</features>
60 <name>
61HTTP proxy-auth NTLM and then POST
62 </name>
63 <setenv>
64# we force our own host name, in order to make the test machine independent
65CURL_GETHOSTNAME=curlhost
66# we try to use the LD_PRELOAD hack, if not a debug build
67LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
68 </setenv>
69 <command>
70http://%HOSTIP:%HTTPPORT/239 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm -d "postit"
71</command>
72<precheck>
73chkhostname curlhost
74</precheck>
75</client>
76
77# Verify data after the test has been "shot"
78<verify>
79<protocol nonewline="yes">
80POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
81Host: %HOSTIP:%HTTPPORT
82Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
83User-Agent: curl/%VERSION
84Accept: */*
85Proxy-Connection: Keep-Alive
86Content-Length: 0
87Content-Type: application/x-www-form-urlencoded
88
89POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
90Host: %HOSTIP:%HTTPPORT
91Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=
92User-Agent: curl/%VERSION
93Accept: */*
94Proxy-Connection: Keep-Alive
95Content-Length: 6
96Content-Type: application/x-www-form-urlencoded
97
98postit
99</protocol>
100</verify>
101</testcase>
102