test62 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP replaced headers
  7. cookies
  8. httponly
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. <data>
  14. HTTP/1.0 200 OK swsclose
  15. Date: Tue, 09 Nov 2010 14:49:00 GMT
  16. Content-Type: text/html
  17. boo
  18. </data>
  19. </reply>
  20. # Client-side
  21. <client>
  22. <server>
  23. http
  24. </server>
  25. <name>
  26. HTTP, send cookies when using custom Host:
  27. </name>
  28. <command>
  29. http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER?hoge=fuga -b log/jar%TESTNUMBER.txt -H "Host: www.host.foo.com"
  30. </command>
  31. <file name="log/jar%TESTNUMBER.txt">
  32. # Netscape HTTP Cookie File
  33. # https://curl.se/docs/http-cookies.html
  34. # This file was generated by libcurl! Edit at your own risk.
  35. #HttpOnly_.foo.com TRUE /we/want/ FALSE 2147483647 test yes
  36. .host.foo.com TRUE /we/want/ FALSE 2147483647 test2 yes
  37. .fake.host.foo.com TRUE /we/want/ FALSE 2147483647 test4 yes
  38. .foo.com TRUE /moo TRUE 0 test3 maybe
  39. </file>
  40. </client>
  41. # Verify data after the test has been "shot"
  42. <verify>
  43. <protocol>
  44. GET /we/want/%TESTNUMBER HTTP/1.1
  45. Host: www.host.foo.com
  46. User-Agent: curl/%VERSION
  47. Accept: */*
  48. Cookie: test2=yes; test=yes
  49. GET /we/want/%TESTNUMBER?hoge=fuga HTTP/1.1
  50. Host: www.host.foo.com
  51. User-Agent: curl/%VERSION
  52. Accept: */*
  53. Cookie: test2=yes; test=yes
  54. </protocol>
  55. </verify>
  56. </testcase>