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