Tree for my work on http://tools.suckless.org/quark/
Find a file
Laslo Hunhold 3bd49b2456
Implement RFC 8615 (Well-Known URIs) and refine access errors
We generally rejected any URI that had a path component beginning
with a '.', i.e. a hidden file. RFC 8615 specifies the well-known URI,
which is used, for instance, with the "http-01" challenge type in
acme-client(1) and will probably see more usage in the future.

To support it, we move the hidden target check after the stat(), so we
don't have to worry about canonicalization of dir-URIs (i.e. missing
trailing '/'). This changes the behaviour a bit, as now quark won't
only send out a 403 whenever a hidden target is requested, but only
if it actually exists, and a 404 otherwise.

Given the earlier call to normabspath() ensures that our path begins
with a '/', we don't need the first check "realtarget[0] == '.'"
anymore, so it can be removed.

Thanks to Robert Russell <robertrussell.72001@gmail.com> for reporting
the lack of support of the RFC 8615 in quark.

Signed-off-by: Laslo Hunhold <dev@frign.de>
2020-08-17 10:39:54 +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 Implement RFC 8615 (Well-Known URIs) and refine access errors 2020-08-17 10:39:54 +02:00
http.h Ensure const-correctness where possible and refactor parse_range() 2020-08-05 18:28:21 +02:00
LICENSE Use timegm() instead of mktime() to generate UNIX-timestamp 2020-07-23 16:48:34 +02:00
main.c Make user/group-handling-code more robust 2020-08-09 23:20:06 +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 Replace off_t with size_t 2020-08-05 18:59:55 +02:00
resp.h Replace off_t with size_t 2020-08-05 18:59:55 +02:00
sock.c Ensure const-correctness where possible and refactor parse_range() 2020-08-05 18:28:21 +02:00
sock.h Ensure const-correctness where possible and refactor parse_range() 2020-08-05 18:28:21 +02:00
util.c Refactor response-generation 2020-08-05 13:41:44 +02:00
util.h Refactor response-generation 2020-08-05 13:41:44 +02:00