A minimal but flexible directory listing server
3bd49b2456
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> |
||
---|---|---|
arg.h | ||
config.def.h | ||
config.mk | ||
http.c | ||
http.h | ||
LICENSE | ||
main.c | ||
Makefile | ||
quark.1 | ||
resp.c | ||
resp.h | ||
sock.c | ||
sock.h | ||
util.c | ||
util.h |