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