Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Curling a file with a negative mtime
$ touch -t 196508231405.14 ./test.tgz"
$ stat ./test.tgz
File: ‘test.tgz’
Size: 6012 Blocks: 16 IO Block: 4096 regular file
Device: 900h/2304d Inode: 127402426 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ ubuntu) Gid: ( 1000/ ubuntu)
Access: 1965-08-23 14:05:14.000000000 +0000
Modify: 1965-08-23 14:05:14.000000000 +0000
Change: 2016-07-06 17:35:26.871223783 +0000
Birth: -
$ curl -v localhost/test.tgz 1> /dev/null
< HTTP/1.1 200 OK
....
< Last-Modified: Mon, 01 Jul 438498963 21:05:30 GMT
< Connection: keep-alive
< ETag: "-8320de6-177c"
....
$ curl -v -H 'if-none-match: "-8320de6-177c"' localhost/test.tgz 1>/dev/null
< HTTP/1.1 304 Not Modified
....
< Last-Modified: Mon, 01 Jul 438498963 21:05:30 GMT
< Connection: keep-alive
< ETag: "-8320de6-177c"
< Expires: Wed, 06 Jul 2016 23:40:19 GMT
< Cache-Control: max-age=21600
< Access-Control-Allow-Origin: *
0 0 0 0 0 0 0 0 --:--:-- 0:00:22 --:--:-- 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.