test1239 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. -z
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. <data nocheck="yes">
  13. HTTP/1.1 200 OK
  14. Date: Tue, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake
  16. Last-Modified: Tue, 13 Jun 2010 12:10:00 GMT
  17. ETag: "21025-dc7-39462498"
  18. Accept-Ranges: bytes
  19. Content-Length: 6
  20. Connection: close
  21. Content-Type: text/html
  22. -foo-
  23. </data>
  24. </reply>
  25. #
  26. # Client-side
  27. <client>
  28. <server>
  29. http
  30. </server>
  31. <name>
  32. HTTP with -z + -w response_code and simulated 304
  33. </name>
  34. <command>
  35. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -z "-dec 12 12:00:00 1999 GMT" -w '%{response_code}'
  36. </command>
  37. </client>
  38. #
  39. # Verify data after the test has been "shot"
  40. <verify>
  41. <protocol>
  42. GET /%TESTNUMBER HTTP/1.1
  43. Host: %HOSTIP:%HTTPPORT
  44. User-Agent: curl/%VERSION
  45. Accept: */*
  46. If-Unmodified-Since: Sun, 12 Dec 1999 12:00:00 GMT
  47. </protocol>
  48. <stdout nonewline="yes">
  49. HTTP/1.1 200 OK
  50. Date: Tue, 09 Nov 2010 14:49:00 GMT
  51. Server: test-server/fake
  52. Last-Modified: Tue, 13 Jun 2010 12:10:00 GMT
  53. ETag: "21025-dc7-39462498"
  54. Accept-Ranges: bytes
  55. Content-Length: 6
  56. Connection: close
  57. Content-Type: text/html
  58. 304
  59. </stdout>
  60. </verify>
  61. </testcase>