A minimal but flexible directory listing server
Find a file
Laslo Hunhold 660b308617
Use timegm() instead of mktime() to generate UNIX-timestamp
The broken down time-representation tm generated earlier is in UTC,
and mktime() assumes that it's in local time instead, leading to
the problem that quark might not send a NOT_MODIFIED in a different
timezone.

timegm() instead correctly interprets the broken down
time-representation tm as UTC and returns the proper timestamp.
It might not be portable like mktime(), but it's complicated to
emulate it otherwise.

Thanks to Jeremy Bobbin <jer@jer.cx> for reporting the bug and
providing this fix, which is why I've added him to the LICENSE.
Thanks also to Hiltjo for his input.

Signed-off-by: Laslo Hunhold <dev@frign.de>
2020-07-23 16:48:34 +02:00
arg.h Correct arg.h license 2018-07-16 11:49:51 +02:00
config.def.h Specify UTF-8 for non-binary content-types 2019-01-02 17:04:23 +01:00
config.mk Be extra pedantic again and remove all warnings 2018-03-05 00:30:53 +01:00
http.c Use timegm() instead of mktime() to generate UNIX-timestamp 2020-07-23 16:48:34 +02:00
http.h Refactor the single source file into multiple modules 2018-02-04 21:27:33 +01:00
LICENSE Use timegm() instead of mktime() to generate UNIX-timestamp 2020-07-23 16:48:34 +02:00
main.c Make host parameters optional 2020-04-21 17:04:52 +02:00
Makefile Refactor the single source file into multiple modules 2018-02-04 21:27:33 +01:00
quark.1 Make host parameters optional 2020-04-21 17:04:52 +02:00
resp.c Fix for sending HTTP response status 304 2020-05-07 13:40:29 +02:00
resp.h Refactor the single source file into multiple modules 2018-02-04 21:27:33 +01:00
sock.c Use compound literals and explicit initialization 2019-05-30 23:15:47 +02:00
sock.h Refactor the single source file into multiple modules 2018-02-04 21:27:33 +01:00
util.c Use pledge(2) and unveil(2) on OpenBSD 2019-09-23 16:56:28 +02:00
util.h Use pledge(2) and unveil(2) on OpenBSD 2019-09-23 16:56:28 +02:00