test1415 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP proxy
  7. cookies
  8. cookiejar
  9. delete expired cookie
  10. </keywords>
  11. </info>
  12. # Server-side
  13. <reply>
  14. <data>
  15. HTTP/1.1 200 OK
  16. Date: Tue, 09 Nov 2010 14:49:00 GMT
  17. Server: test-server/fake
  18. Content-Length: 4
  19. Content-Type: text/html
  20. Funny-head: yesyes
  21. Set-Cookie: test1value=test1; domain=example.com; path=/;
  22. %if large-time
  23. Set-Cookie: test2value=test2; expires=Thursday, 31-Dec-2525 00:00:00 GMT; domain=example.com; path=/;
  24. Set-Cookie: test3value=test3; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
  25. Set-Cookie: test4value=test4; expires=Thursday, 31-Dec-2525 00:00:00 GMT; domain=example.com; path=/;
  26. Set-Cookie: test5value=test5; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
  27. Set-Cookie: test6value=test6; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
  28. Set-Cookie: test7value=test7; expires=Thursday, 31-Dec-2525 00:00:00 GMT; domain=example.com; path=/;
  29. Set-Cookie: test8value=test8; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
  30. %else
  31. Set-Cookie: test2value=test2; expires=Thursday, 31-Dec-2037 00:00:00 GMT; domain=example.com; path=/;
  32. Set-Cookie: test3value=test3; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
  33. Set-Cookie: test4value=test4; expires=Thursday, 31-Dec-2037 00:00:00 GMT; domain=example.com; path=/;
  34. Set-Cookie: test5value=test5; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
  35. Set-Cookie: test6value=test6; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
  36. Set-Cookie: test7value=test7; expires=Thursday, 31-Dec-2037 00:00:00 GMT; domain=example.com; path=/;
  37. Set-Cookie: test8value=test8; expires=Monday, 13-Jun-1988 03:04:55 GMT; domain=example.com; path=/;
  38. %endif
  39. boo
  40. </data>
  41. </reply>
  42. # Client-side
  43. <client>
  44. <server>
  45. http
  46. </server>
  47. <name>
  48. Delete expired cookies
  49. </name>
  50. <setenv>
  51. TZ=GMT
  52. </setenv>
  53. <command>
  54. http://example.com/we/want/%TESTNUMBER -b none -c %LOGDIR/jar%TESTNUMBER.txt -x %HOSTIP:%HTTPPORT
  55. </command>
  56. <features>
  57. cookies
  58. proxy
  59. </features>
  60. </client>
  61. # Verify data after the test has been "shot"
  62. <verify>
  63. <protocol>
  64. GET http://example.com/we/want/%TESTNUMBER HTTP/1.1
  65. Host: example.com
  66. User-Agent: curl/%VERSION
  67. Accept: */*
  68. Proxy-Connection: Keep-Alive
  69. </protocol>
  70. <file name="%LOGDIR/jar%TESTNUMBER.txt" mode="text">
  71. # Netscape HTTP Cookie File
  72. # https://curl.se/docs/http-cookies.html
  73. # This file was generated by libcurl! Edit at your own risk.
  74. %if large-time
  75. .example.com TRUE / FALSE 17545593600 test7value test7
  76. .example.com TRUE / FALSE 17545593600 test4value test4
  77. .example.com TRUE / FALSE 17545593600 test2value test2
  78. %else
  79. .example.com TRUE / FALSE 2145830400 test7value test7
  80. .example.com TRUE / FALSE 2145830400 test4value test4
  81. .example.com TRUE / FALSE 2145830400 test2value test2
  82. %endif
  83. .example.com TRUE / FALSE 0 test1value test1
  84. </file>
  85. </verify>
  86. </testcase>