Home | History | Annotate | Download | only in data
      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 followlocation
      6 cookies
      7 </keywords>
      8 </info>
      9 #
     10 # Server-side
     11 <reply>
     12 <data>
     13 HTTP/1.1 302 OK
     14 Date: Thu, 09 Nov 2010 14:49:00 GMT
     15 Server: test-server/fake swsclose
     16 Content-Type: text/html
     17 Funny-head: yesyes
     18 Location: http://goto.second.host.now/3170002
     19 Content-Length: 8
     20 Connection: close
     21 
     22 contents
     23 </data>
     24 <data2>
     25 HTTP/1.1 200 OK
     26 Date: Thu, 09 Nov 2010 14:49:00 GMT
     27 Server: test-server/fake swsclose
     28 Content-Type: text/html
     29 Funny-head: yesyes
     30 Content-Length: 9
     31 
     32 contents
     33 </data2>
     34 
     35 <datacheck>
     36 HTTP/1.1 302 OK
     37 Date: Thu, 09 Nov 2010 14:49:00 GMT
     38 Server: test-server/fake swsclose
     39 Content-Type: text/html
     40 Funny-head: yesyes
     41 Location: http://goto.second.host.now/3170002
     42 Content-Length: 8
     43 Connection: close
     44 
     45 HTTP/1.1 200 OK
     46 Date: Thu, 09 Nov 2010 14:49:00 GMT
     47 Server: test-server/fake swsclose
     48 Content-Type: text/html
     49 Funny-head: yesyes
     50 Content-Length: 9
     51 
     52 contents
     53 </datacheck>
     54 </reply>
     55 
     56 #
     57 # Client-side
     58 <client>
     59 <server>
     60 http
     61 </server>
     62  <name>
     63 HTTP with custom Cookie: and redirect to new host
     64  </name>
     65  <command>
     66 http://first.host.it.is/we/want/that/page/317 -x %HOSTIP:%HTTPPORT -H "Cookie: test=yes" --location
     67 </command>
     68 </client>
     69 
     70 #
     71 # Verify data after the test has been "shot"
     72 <verify>
     73 <strip>
     74 ^User-Agent:.*
     75 </strip>
     76 <protocol>
     77 GET http://first.host.it.is/we/want/that/page/317 HTTP/1.1
     78 Host: first.host.it.is
     79 Accept: */*
     80 Proxy-Connection: Keep-Alive
     81 Cookie: test=yes
     82 
     83 GET http://goto.second.host.now/3170002 HTTP/1.1
     84 Host: goto.second.host.now
     85 Accept: */*
     86 Proxy-Connection: Keep-Alive
     87 
     88 </protocol>
     89 </verify>
     90 </testcase>
     91