test1104 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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: Tue, 09 Nov 2010 14:49:00 GMT
  15. Location: /want/data/%TESTNUMBER0002
  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 13 11:56:27 GMT 2037;
  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: Tue, 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: Tue, 09 Nov 2010 14:49:00 GMT
  32. Location: /want/data/%TESTNUMBER0002
  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 13 11:56:27 GMT 2037;
  36. Connection: close
  37. HTTP/1.1 200 Followed here fine swsclose
  38. Date: Tue, 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/%TESTNUMBER -L -x %HOSTIP:%HTTPPORT -c log/cookies%TESTNUMBER.jar
  54. </command>
  55. <features>
  56. proxy
  57. </features>
  58. </client>
  59. # Verify data after the test has been "shot"
  60. <verify>
  61. <protocol>
  62. GET http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER HTTP/1.1
  63. Host: %HOSTIP:%HTTPPORT
  64. User-Agent: curl/%VERSION
  65. Accept: */*
  66. Proxy-Connection: Keep-Alive
  67. GET http://%HOSTIP:%HTTPPORT/want/data/%TESTNUMBER0002 HTTP/1.1
  68. Host: %HOSTIP:%HTTPPORT
  69. User-Agent: curl/%VERSION
  70. Accept: */*
  71. Proxy-Connection: Keep-Alive
  72. Cookie: test2=true
  73. </protocol>
  74. </verify>
  75. </testcase>