test2081 (1550B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP GET 6 referer 7 followlocation 8 --write-out 9 </keywords> 10 </info> 11 12 # Server-side 13 <reply> 14 <data nocheck="yes"> 15 HTTP/1.1 301 This is a weirdo text message swsclose 16 Location: data/%TESTNUMBER0002.txt?coolsite=yes 17 Content-Length: 62 18 Connection: close 19 20 This server reply is for testing a simple Location: following 21 </data> 22 <data2> 23 HTTP/1.1 200 This is another weirdo text message swsclose 24 Connection: close 25 26 Thanks for following. 27 </data2> 28 </reply> 29 30 # Client-side 31 <client> 32 <server> 33 http 34 </server> 35 <name> 36 Automatic referrer credential and anchor stripping check 37 </name> 38 <command> 39 http://user:pass@%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER#anchor --location --referer ';auto' --write-out '%{referer}\n' 40 </command> 41 </client> 42 43 # Verify data after the test has been "shot" 44 <verify> 45 <protocol> 46 GET /we/want/our/%TESTNUMBER HTTP/1.1 47 Host: %HOSTIP:%HTTPPORT 48 Authorization: Basic %b64[user:pass]b64% 49 User-Agent: curl/%VERSION 50 Accept: */* 51 52 GET /we/want/our/data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1 53 Host: %HOSTIP:%HTTPPORT 54 Authorization: Basic %b64[user:pass]b64% 55 User-Agent: curl/%VERSION 56 Accept: */* 57 Referer: http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER 58 59 </protocol> 60 <stdout> 61 HTTP/1.1 301 This is a weirdo text message swsclose 62 Location: data/%TESTNUMBER0002.txt?coolsite=yes 63 Content-Length: 62 64 Connection: close 65 66 HTTP/1.1 200 This is another weirdo text message swsclose 67 Connection: close 68 69 Thanks for following. 70 http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER 71 </stdout> 72 </verify> 73 </testcase>