test1443 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. -O
  7. --remote-time
  8. </keywords>
  9. </info>
  10. #
  11. <reply>
  12. <data nocheck="yes">
  13. HTTP/1.1 200 OK
  14. Date: Thu, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake
  16. Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
  17. Content-Length: 6
  18. Connection: close
  19. 12345
  20. </data>
  21. </reply>
  22. #
  23. # Client-side
  24. <client>
  25. # This relies on the debug feature to allow us to set a directory
  26. # in which to store the -O output
  27. <features>
  28. debug
  29. </features>
  30. <server>
  31. http
  32. </server>
  33. <name>
  34. HTTP GET with -O and --remote-time
  35. </name>
  36. <setenv>
  37. CURL_TESTDIR=%PWD/log
  38. </setenv>
  39. <command option="no-output,no-include">
  40. http://%HOSTIP:%HTTPPORT/1443 -O --remote-time
  41. </command>
  42. # Verify the mtime of the file. The mtime is specifically chosen to be an even
  43. # number so that it can be represented exactly on a FAT filesystem.
  44. <postcheck>
  45. perl -e 'exit((stat("log/1443"))[9] != 960898200)'
  46. </postcheck>
  47. </client>
  48. #
  49. # Verify data after the test has been "shot"
  50. <verify>
  51. <strip>
  52. ^User-Agent:.*
  53. </strip>
  54. <protocol>
  55. GET /1443 HTTP/1.1
  56. Host: %HOSTIP:%HTTPPORT
  57. Accept: */*
  58. </protocol>
  59. <file name="log/1443">
  60. 12345
  61. </file>
  62. </verify>
  63. </testcase>