test329 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. cookies
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.1 200 OK
  13. Date: Tue, 09 Nov 2010 14:49:00 GMT
  14. Server: test-server/fake
  15. Content-Type: text/html
  16. Funny-head: yesyes
  17. Set-Cookie: test=yes; path=/we/want/; domain=.host.foo.com; Max-Age=0;
  18. Content-Length: 4
  19. boo
  20. </data>
  21. <data2>
  22. HTTP/1.1 200 OK
  23. Funny-head: yesyes
  24. Content-Length: 4
  25. moo
  26. </data2>
  27. </reply>
  28. # Client-side
  29. <client>
  30. <file name="log/jar%TESTNUMBER.txt" mode="text">
  31. .host.foo.com TRUE /we/want/ FALSE 2147483647 test no
  32. </file>
  33. <file name="log/jar%TESTNUMBER-2.txt" mode="text">
  34. .host.foo.com TRUE /we/want/ FALSE 2147483647 tester yes
  35. </file>
  36. <server>
  37. http
  38. </server>
  39. <name>
  40. HTTP cookie with Max-Age=0
  41. </name>
  42. # Explicitly set the time zone to a known good one, in case the user is
  43. # using one of the 'right' zones that take into account leap seconds
  44. # which causes the cookie expiry times to be different.
  45. <setenv>
  46. TZ=GMT
  47. </setenv>
  48. <command>
  49. http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -b log/jar%TESTNUMBER.txt -b log/jar%TESTNUMBER-2.txt -H "Host: host.foo.com" http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER0002
  50. </command>
  51. </client>
  52. # Verify data after the test has been "shot"
  53. <verify>
  54. <protocol>
  55. GET /we/want/%TESTNUMBER HTTP/1.1
  56. Host: host.foo.com
  57. User-Agent: curl/%VERSION
  58. Accept: */*
  59. Cookie: tester=yes; test=no
  60. GET /we/want/%TESTNUMBER0002 HTTP/1.1
  61. Host: host.foo.com
  62. User-Agent: curl/%VERSION
  63. Accept: */*
  64. Cookie: tester=yes
  65. </protocol>
  66. </verify>
  67. </testcase>