test7 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. cookies
  7. header dump
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 200 OK
  14. Date: Tue, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake
  16. Content-Type: text/html
  17. Funny-head: yesyes swsclose
  18. Set-Cookie: foobar=name; domain=127.0.0.1; path=/;
  19. Set-Cookie: mismatch=this; domain=127.0.0.1; path="/silly/";
  20. Set-Cookie: partmatch=present; domain=.0.0.1; path=/;
  21. </data>
  22. </reply>
  23. # Client-side
  24. <client>
  25. <server>
  26. http
  27. </server>
  28. <name>
  29. HTTP with cookie parser and header recording
  30. </name>
  31. <command>
  32. http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -b none -D log/heads%TESTNUMBER.txt
  33. </command>
  34. </client>
  35. # Verify data after the test has been "shot"
  36. <verify>
  37. <protocol>
  38. GET /we/want/%TESTNUMBER HTTP/1.1
  39. Host: %HOSTIP:%HTTPPORT
  40. User-Agent: curl/%VERSION
  41. Accept: */*
  42. </protocol>
  43. <file name="log/heads%TESTNUMBER.txt">
  44. HTTP/1.1 200 OK
  45. Date: Tue, 09 Nov 2010 14:49:00 GMT
  46. Server: test-server/fake
  47. Content-Type: text/html
  48. Funny-head: yesyes swsclose
  49. Set-Cookie: foobar=name; domain=127.0.0.1; path=/;
  50. Set-Cookie: mismatch=this; domain=127.0.0.1; path="/silly/";
  51. Set-Cookie: partmatch=present; domain=.0.0.1; path=/;
  52. </file>
  53. </verify>
  54. </testcase>