| lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | <testcase> | 
 | 2 | <info> | 
 | 3 | <keywords> | 
 | 4 | HTTP | 
 | 5 | HTTP GET | 
 | 6 | HTTP proxy | 
 | 7 | cookies | 
 | 8 | </keywords> | 
 | 9 | </info> | 
 | 10 |  | 
 | 11 | # Server-side | 
 | 12 | <reply> | 
 | 13 | <data> | 
 | 14 | HTTP/1.1 301 Moved | 
 | 15 | Date: Thu, 09 Nov 2010 14:49:00 GMT | 
 | 16 | Location: /want/data/11040002 | 
 | 17 | Server: test-server/fake | 
 | 18 | Set-Cookie: test=true; domain=127.0.0.1; path=/; expires=Thu Jan  1 00:00:00 GMT 1970; | 
 | 19 | Set-Cookie: test2=true; domain=127.0.0.1; path=/; expires=Fri Feb 2 11:56:27 GMT 2035; | 
 | 20 | Connection: close | 
 | 21 |  | 
 | 22 | This server reply is for testing a set-cookie | 
 | 23 |  | 
 | 24 | </data> | 
 | 25 | <data2> | 
 | 26 | HTTP/1.1 200 Followed here fine swsclose | 
 | 27 | Date: Thu, 09 Nov 2010 14:49:00 GMT | 
 | 28 | Server: test-server/fake | 
 | 29 | Content-Length: 52 | 
 | 30 |  | 
 | 31 | If this is received, the location following worked | 
 | 32 |  | 
 | 33 | </data2> | 
 | 34 | <datacheck> | 
 | 35 | HTTP/1.1 301 Moved | 
 | 36 | Date: Thu, 09 Nov 2010 14:49:00 GMT | 
 | 37 | Location: /want/data/11040002 | 
 | 38 | Server: test-server/fake | 
 | 39 | Set-Cookie: test=true; domain=127.0.0.1; path=/; expires=Thu Jan  1 00:00:00 GMT 1970; | 
 | 40 | Set-Cookie: test2=true; domain=127.0.0.1; path=/; expires=Fri Feb 2 11:56:27 GMT 2035; | 
 | 41 | Connection: close | 
 | 42 |  | 
 | 43 | HTTP/1.1 200 Followed here fine swsclose | 
 | 44 | Date: Thu, 09 Nov 2010 14:49:00 GMT | 
 | 45 | Server: test-server/fake | 
 | 46 | Content-Length: 52 | 
 | 47 |  | 
 | 48 | If this is received, the location following worked | 
 | 49 |  | 
 | 50 | </datacheck> | 
 | 51 | </reply> | 
 | 52 |  | 
 | 53 | # Client-side | 
 | 54 | <client> | 
 | 55 | <server> | 
 | 56 | http | 
 | 57 | </server> | 
 | 58 |  <name> | 
 | 59 | HTTP cookie expiry date at Jan 1 00:00:00 GMT 1970 | 
 | 60 |  </name> | 
 | 61 |  <command> | 
 | 62 | http://%HOSTIP:%HTTPPORT/want/1104 -L -x %HOSTIP:%HTTPPORT -c log/cookies1104.jar | 
 | 63 | </command> | 
 | 64 | </client> | 
 | 65 |  | 
 | 66 | # Verify data after the test has been "shot" | 
 | 67 | <verify> | 
 | 68 | <strip> | 
 | 69 | ^User-Agent:.* | 
 | 70 | </strip> | 
 | 71 | <protocol> | 
 | 72 | GET http://%HOSTIP:%HTTPPORT/want/1104 HTTP/1.1
 | 
 | 73 | Host: %HOSTIP:%HTTPPORT
 | 
 | 74 | Accept: */*
 | 
 | 75 | Proxy-Connection: Keep-Alive
 | 
 | 76 | 
 | 
 | 77 | GET http://%HOSTIP:%HTTPPORT/want/data/11040002 HTTP/1.1
 | 
 | 78 | Host: %HOSTIP:%HTTPPORT
 | 
 | 79 | Accept: */*
 | 
 | 80 | Proxy-Connection: Keep-Alive
 | 
 | 81 | Cookie: test2=true
 | 
 | 82 | 
 | 
 | 83 | </protocol> | 
 | 84 | </verify> | 
 | 85 | </testcase> |