• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6POST callback
7HTTP proxy
8HTTP proxy NTLM auth
9</keywords>
10</info>
11# Server-side
12<reply>
13
14<data>
15HTTP/1.1 407 Authorization Required swsclose
16Server: Apache/1.3.27 (Darwin) PHP/4.1.2
17Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
18Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
19Proxy-Authenticate: NTLM
20Content-Type: text/html; charset=iso-8859-1
21Connection: close
22
23This is not the real page
24</data>
25
26# this is returned first since we get no proxy-auth
27<data1001>
28HTTP/1.1 407 Authorization Required to proxy me my dear
29Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
30Content-Length: 34
31
32Hey you, authenticate or go away!
33</data1001>
34
35# This is supposed to be returned when the server gets the second
36# Authorization: NTLM line passed-in from the client
37<data1002>
38HTTP/1.1 200 Things are fine in proxy land swsclose
39Server: Microsoft-IIS/5.0
40Content-Type: text/html; charset=iso-8859-1
41Content-Length: 42
42
43Contents of that page you requested, sir.
44</data1002>
45
46<datacheck>
47HTTP/1.1 407 Authorization Required swsclose
48Server: Apache/1.3.27 (Darwin) PHP/4.1.2
49Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
50Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
51Proxy-Authenticate: NTLM
52Content-Type: text/html; charset=iso-8859-1
53Connection: close
54
55HTTP/1.1 407 Authorization Required to proxy me my dear
56Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
57Content-Length: 34
58
59HTTP/1.1 200 Things are fine in proxy land swsclose
60Server: Microsoft-IIS/5.0
61Content-Type: text/html; charset=iso-8859-1
62Content-Length: 42
63
64Contents of that page you requested, sir.
65</datacheck>
66</reply>
67
68# Client-side
69<client>
70<server>
71http
72</server>
73# tool to use
74<tool>
75lib547
76</tool>
77<features>
78NTLM
79!SSPI
80debug
81</features>
82 <name>
83HTTP proxy auth NTLM with POST data from read callback
84 </name>
85 <setenv>
86# we force our own host name, in order to make the test machine independent
87CURL_GETHOSTNAME=curlhost
88# we try to use the LD_PRELOAD hack, if not a debug build
89LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
90 </setenv>
91 <command>
92http://test.remote.example.com/path/547 http://%HOSTIP:%HTTPPORT testuser:testpass
93</command>
94<precheck>
95chkhostname 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>
105POST http://test.remote.example.com/path/547 HTTP/1.1
106Host: test.remote.example.com
107User-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
108Accept: */*
109Proxy-Connection: Keep-Alive
110Content-Length: 36
111Content-Type: application/x-www-form-urlencoded
112
113this is the blurb we want to upload
114POST http://test.remote.example.com/path/547 HTTP/1.1
115Host: test.remote.example.com
116Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
117User-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
118Accept: */*
119Proxy-Connection: Keep-Alive
120Content-Length: 0
121Content-Type: application/x-www-form-urlencoded
122
123POST http://test.remote.example.com/path/547 HTTP/1.1
124Host: test.remote.example.com
125Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
126User-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
127Accept: */*
128Proxy-Connection: Keep-Alive
129Content-Length: 36
130Content-Type: application/x-www-form-urlencoded
131
132this is the blurb we want to upload
133</protocol>
134</verify>
135</testcase>
136