test1566 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. --etag-compare
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. <data nocheck="yes">
  13. HTTP/1.1 304 Not modified
  14. Date: Tue, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake
  16. Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
  17. ETag: "21025-dc7-39462498"
  18. Connection: close
  19. Content-Type: text/html
  20. </data>
  21. </reply>
  22. #
  23. # Client-side
  24. <client>
  25. <server>
  26. http
  27. </server>
  28. <name>
  29. --etag-compare that gets a 304 back shouldn't overwrite the file
  30. </name>
  31. <command option="no-output,no-include">
  32. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -o log/output%TESTNUMBER --etag-compare log/etag%TESTNUMBER
  33. </command>
  34. <file name="log/etag%TESTNUMBER">
  35. "123456"
  36. </file>
  37. <file1 name="log/output%TESTNUMBER">
  38. downloaded already
  39. </file1>
  40. </client>
  41. #
  42. # Verify data after the test has been "shot"
  43. <verify>
  44. <protocol>
  45. GET /%TESTNUMBER HTTP/1.1
  46. Host: %HOSTIP:%HTTPPORT
  47. User-Agent: curl/%VERSION
  48. Accept: */*
  49. If-None-Match: "123456"
  50. </protocol>
  51. # verify that the target file is untouched
  52. <file name="log/output%TESTNUMBER">
  53. downloaded already
  54. </file>
  55. </verify>
  56. </testcase>