test327 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. cookies
  7. header dump
  8. </keywords>
  9. </info>
  10. # This test verifies that the cookie file gets created even if the last cookie
  11. # has been removed - particularly important when the file is going to be read
  12. # again and thus must not contain old contents.
  13. # Server-side
  14. <reply>
  15. <data>
  16. HTTP/1.1 200 OK
  17. Date: Thu, 09 Nov 2010 14:49:00 GMT
  18. Server: test-server/fake
  19. Content-Type: text/html
  20. Funny-head: yesyes swsclose
  21. Set-Cookie: foobar=name; expires=Thu, 22 Nov 2037 10:54:11 GMT;
  22. </data>
  23. <data2>
  24. HTTP/1.1 200 OK
  25. Date: Thu, 09 Nov 2010 14:49:00 GMT
  26. Server: test-server/fake
  27. Content-Type: text/html
  28. Funny-head: yesyes swsclose
  29. Set-Cookie: foobar=name; expires=Thu, 01 Jan 1970 00:00:00 GMT;
  30. </data2>
  31. </reply>
  32. # Client-side
  33. <client>
  34. <server>
  35. http
  36. </server>
  37. <name>
  38. HTTP with cookiejar without cookies left
  39. </name>
  40. <command>
  41. http://%HOSTIP:%HTTPPORT/we/want/327 -b none -c log/cookies327 http://%HOSTIP:%HTTPPORT/we/want/3270002
  42. </command>
  43. </client>
  44. # Verify data after the test has been "shot"
  45. <verify>
  46. <strip>
  47. ^User-Agent:.*
  48. </strip>
  49. <protocol>
  50. GET /we/want/327 HTTP/1.1
  51. Host: %HOSTIP:%HTTPPORT
  52. Accept: */*
  53. GET /we/want/3270002 HTTP/1.1
  54. Host: %HOSTIP:%HTTPPORT
  55. Accept: */*
  56. Cookie: foobar=name
  57. </protocol>
  58. <file name="log/cookies327" mode="text">
  59. # Netscape HTTP Cookie File
  60. # https://curl.haxx.se/docs/http-cookies.html
  61. # This file was generated by libcurl! Edit at your own risk.
  62. </file>
  63. </verify>
  64. </testcase>