summaryrefslogtreecommitdiffstats
path: root/src/serve.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix double freeDrew DeVault2020-11-081-0/+1
|
* check if file served as cgi is executableRené Wagner2020-11-081-0/+6
| | | | | if not, send a response 50 to the client fixes ~sircmpwn/gmni#47
* fix typo in GATEWAY_INTERFACE valuedbandstra2020-11-081-1/+1
|
* Fix memory leaksTom Lebreux2020-11-081-0/+3
|
* Implement URL rewrites with regex capture groupsDrew DeVault2020-11-011-1/+122
|
* Change meaning of root (backwards incompatible!)Drew DeVault2020-11-011-9/+10
| | | | | | | | | This takes the nginx approach to the "root" directive, which is simpler to implement and more consistent with more complex routing behaviors like regexp. The path component of the URL is now simply appended to the root to form the path to the file which should be served to the client.
* Implement regex route matchingDrew DeVault2020-11-011-2/+16
|
* Implement MIME database supportDrew DeVault2020-10-281-1/+1
|
* CGI: Fix SCRIPT_NAME variableDrew DeVault2020-10-261-3/+6
|
* CGI: set PATH_INFODrew DeVault2020-10-251-16/+48
|
* Initial support for CGI scriptsDrew DeVault2020-10-251-0/+83
|
* Initial implementation of a routing tableDrew DeVault2020-10-251-4/+49
|
* 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