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