summaryrefslogtreecommitdiffstats
path: root/src/serve.c
Commit message (Collapse)AuthorAgeFilesLines
* Overhaul network I/O to be async for realDrew DeVault2020-10-251-0/+1
| | | | | Had to totally cut off OpenSSL from the network fd because obviously OpenSSL is just going to wreck our shit
* add a missing "/" to autoindex pathsio mintz2020-10-151-2/+1
| | | | | | | | | | | | | | | | | | | | With the following directory structure: /srv/gmni: baz/ foo/ /srv/gmni/baz: a /srv/gmni/foo: bar/ /srv/gmni/foo/bar: b trying to access gemini://somesite/ with autoindex=on works, but accessing /foo fails because it tries to stat /srv/gmni/foobar instead of /srv/gmni/foo/bar. This commit fixes that by adding a trailing slash.
* serve: fix gcc-9.3.0 error in serve_autoindexWilliam Casarin2020-10-151-1/+1
| | | | | | | | | | | | | gcc 9.3.0 catches an off-by-one error with strncat in serve_autoindex where it might not write a 0 byte: In function ‘strncat’, inlined from ‘serve_autoindex’ at src/serve.c:60:3: /nix/store/...glibc-2.31-dev/include/bits/string_fortified.h:136:10: error: ‘__builtin___strncat_chk’ specified bound 4097 equals destination size [-Werror=stringop-overflow=] Signed-off-by: William Casarin <jb55@jb55.com>
* return false on request_validate errorsChris Vittal2020-10-121-1/+4
| | | | | This will report proper errors to clients rather than continuing on with request processing.
* Implement autoindex optionDrew DeVault2020-09-261-19/+144
|
* Rehome some logic from server.c -> serve.cDrew DeVault2020-09-261-0/+128