test1443 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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: 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. 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=%LOGDIR
  38. </setenv>
  39. <command option="no-output,no-include">
  40. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -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("%LOGDIR/%TESTNUMBER"))[9] != 960898200)'
  46. </postcheck>
  47. </client>
  48. #
  49. # Verify data after the test has been "shot"
  50. <verify>
  51. <protocol>
  52. GET /%TESTNUMBER HTTP/1.1
  53. Host: %HOSTIP:%HTTPPORT
  54. User-Agent: curl/%VERSION
  55. Accept: */*
  56. </protocol>
  57. <file name="%LOGDIR/%TESTNUMBER">
  58. 12345
  59. </file>
  60. </verify>
  61. </testcase>