2
0

test1104 1.8 KB

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