test61 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. cookies
  7. cookiejar
  8. HTTP replaced headers
  9. httponly
  10. </keywords>
  11. </info>
  12. # Server-side
  13. <reply>
  14. <data>
  15. HTTP/1.1 200 OK
  16. Date: Thu, 09 Nov 2010 14:49:00 GMT
  17. Server: test-server/fake
  18. Content-Type: text/html
  19. Funny-head: yesyes
  20. Set-Cookie: test=yes; httponly; domain=foo.com; expires=Fri Feb 2 11:56:27 GMT 2035
  21. SET-COOKIE: test2=yes; domain=host.foo.com; expires=Fri Feb 2 11:56:27 GMT 2035
  22. Set-Cookie: test3=maybe; domain=foo.com; path=/moo; secure
  23. Set-Cookie: test4=no; domain=nope.foo.com; path=/moo; secure
  24. Set-Cookie: test5=name; domain=anything.com; path=/ ; secure
  25. Set-Cookie: fake=fooledyou; domain=..com; path=/;
  26. Content-Length: 4
  27. boo
  28. </data>
  29. </reply>
  30. # Client-side
  31. <client>
  32. <server>
  33. http
  34. </server>
  35. <name>
  36. HTTP with various cookies and custom Host:
  37. </name>
  38. # Explicitly set the time zone to a known good one, in case the user is
  39. # using one of the 'right' zones that take into account leap seconds
  40. # which causes the cookie expiry times to be different.
  41. <setenv>
  42. TZ=GMT
  43. </setenv>
  44. <command>
  45. http://%HOSTIP:%HTTPPORT/we/want/61 -c log/jar61.txt -H "Host: www.host.foo.com"
  46. </command>
  47. </client>
  48. # Verify data after the test has been "shot"
  49. <verify>
  50. <strip>
  51. ^User-Agent:.*
  52. </strip>
  53. <protocol>
  54. GET /we/want/61 HTTP/1.1
  55. Accept: */*
  56. Host: www.host.foo.com
  57. </protocol>
  58. <file name="log/jar61.txt" mode="text">
  59. # Netscape HTTP Cookie File
  60. # http://curl.haxx.se/docs/http-cookies.html
  61. # This file was generated by libcurl! Edit at your own risk.
  62. #HttpOnly_.foo.com TRUE /we/want/ FALSE 2054030187 test yes
  63. .host.foo.com TRUE /we/want/ FALSE 2054030187 test2 yes
  64. .foo.com TRUE /moo TRUE 0 test3 maybe
  65. </file>
  66. </verify>
  67. </testcase>