1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP GET 6</keywords> 7</info> 8 9# 10# Server-side 11<reply> 12<data nocheck="yes"> 13HTTP/1.1 200 OK 14Content-Length: 0 15 16</data> 17</reply> 18 19# 20# Client-side 21<client> 22<server> 23http 24</server> 25<name> 26verify -w local/remote port+ip after connection reuse 27</name> 28<command> 29http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER -w 'local port == %{local_port}\nlocal ip == %{local_ip}\nremote_ip == %{remote_ip}\nremote_port == %{remote_port}\n' 30</command> 31</client> 32 33# 34# Verify data after the test has been "shot" 35<verify> 36<protocol> 37GET /%TESTNUMBER HTTP/1.1 38Host: %HOSTIP:%HTTPPORT 39User-Agent: curl/%VERSION 40Accept: */* 41 42GET /%TESTNUMBER HTTP/1.1 43Host: %HOSTIP:%HTTPPORT 44User-Agent: curl/%VERSION 45Accept: */* 46 47</protocol> 48 49# replace the number with a fixed string since the port number is not 50# known to the test script but it should always be a decimal number 51<stripfile> 52s/local port == (\d+)/local port == [digits]/ 53</stripfile> 54<stdout> 55HTTP/1.1 200 OK 56Content-Length: 0 57 58local port == [digits] 59local ip == 127.0.0.1 60remote_ip == %HOSTIP 61remote_port == %HTTPPORT 62HTTP/1.1 200 OK 63Content-Length: 0 64 65local port == [digits] 66local ip == 127.0.0.1 67remote_ip == %HOSTIP 68remote_port == %HTTPPORT 69</stdout> 70</verify> 71</testcase> 72