| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | Change meaning of root (backwards incompatible!) | Drew DeVault | 2020-11-01 | 2 | -12/+16 |
| | | | | | | | | | | 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. | ||||
| * | It's actually ECMAScript 2018 compatible | Drew DeVault | 2020-11-01 | 1 | -2/+2 |
| | | |||||
| * | regexp.c: ditch unused test code | Drew DeVault | 2020-11-01 | 1 | -170/+0 |
| | | |||||
| * | Clarify regex details in gmnisrv.ini(5) | Drew DeVault | 2020-11-01 | 1 | -0/+5 |
| | | |||||
| * | Implement regex route matching | Drew DeVault | 2020-11-01 | 1 | -2/+16 |
| | | |||||
| * | Drop most of the unicode tables | Drew DeVault | 2020-10-29 | 1 | -4210/+0 |
| | | |||||
| * | Initial pass on regex routing support | Drew DeVault | 2020-10-29 | 7 | -5/+7561 |
| | | | | | | | | | | All this does is parse the regexes out of the config file. I've vendored libregexp from Bellard's quickjs project, because it's reasonably small and self-contained, and POSIX regexes don't support captures. We're eventually going to want captures for URL rewrites, so this'll do for now. | ||||
| * | Fail gracefully if mime database is not present | Drew DeVault | 2020-10-28 | 1 | -1/+7 |
| | | |||||
| * | config: free more routing information on finish | Drew DeVault | 2020-10-28 | 1 | -0/+11 |
| | | |||||
| * | Implement MIME database support | Drew DeVault | 2020-10-28 | 5 | -13/+110 |
| | | |||||
| * | server: handle write errors | Drew DeVault | 2020-10-28 | 1 | -1/+5 |
| | | |||||
| * | CGI: Fix SCRIPT_NAME variable | Drew DeVault | 2020-10-26 | 1 | -3/+6 |
| | | |||||
| * | CGI: set PATH_INFO | Drew DeVault | 2020-10-25 | 1 | -16/+48 |
| | | |||||
| * | Initial support for CGI scripts | Drew DeVault | 2020-10-25 | 4 | -0/+146 |
| | | |||||
| * | Initial implementation of a routing table | Drew DeVault | 2020-10-25 | 4 | -25/+183 |
| | | |||||
| * | Overhaul network I/O to be async for real | Drew DeVault | 2020-10-25 | 5 | -108/+249 |
| | | | | | | 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 paths | io mintz | 2020-10-15 | 1 | -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_autoindex | William Casarin | 2020-10-15 | 1 | -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 errors | Chris Vittal | 2020-10-12 | 1 | -1/+4 |
| | | | | | | This will report proper errors to clients rather than continuing on with request processing. | ||||
| * | Change assert to 2-param version to comply with C11. | Kevin Sangeelee | 2020-09-29 | 1 | -1/+1 |
| | | |||||
| * | Bubble up client disconnect state | Drew DeVault | 2020-09-27 | 1 | -23/+36 |
| | | | | | This will fix the segfaults but won't fix slowlorris | ||||
| * | Break after processing polled client | Drew DeVault | 2020-09-27 | 1 | -0/+3 |
| | | | | | Otherwise we might not grok it, ya jive | ||||
| * | Only handle one client per poll iteration | Drew DeVault | 2020-09-27 | 1 | -8/+4 |
| | | | | | | This is a bit of a hack but it avoids some problems with invalid reads when a client gets disconnected | ||||
| * | mime: add .xml -> text/xml | Drew DeVault | 2020-09-27 | 1 | -0/+3 |
| | | |||||
| * | server.c: re-locate definitions to appropriate scope | Drew DeVault | 2020-09-26 | 1 | -7/+7 |
| | | |||||
| * | README.md: update example config | Drew DeVault | 2020-09-26 | 1 | -2/+5 |
| | | |||||
| * | Set SO_REUSEADDR | Drew DeVault | 2020-09-26 | 1 | -1/+2 |
| | | |||||
| * | server.c: appease GCC's magic pixie bullshit | Drew DeVault | 2020-09-26 | 1 | -2/+2 |
| | | |||||
| * | server.c: import netinet/in.h | Drew DeVault | 2020-09-26 | 1 | -0/+1 |
| | | |||||
| * | config.ini: change suggested root directory | Drew DeVault | 2020-09-26 | 1 | -1/+1 |
| | | |||||
| * | Fix size of in{,6}_addr | Drew DeVault | 2020-09-26 | 1 | -2/+2 |
| | | |||||
| * | Document (and tweak) log format | Drew DeVault | 2020-09-26 | 2 | -3/+16 |
| | | |||||
| * | README.md: formatting | Drew DeVault | 2020-09-26 | 1 | -2/+3 |
| | | |||||
| * | Add dependency list | Drew DeVault | 2020-09-26 | 1 | -0/+6 |
| | | |||||
| * | Documentation | Drew DeVault | 2020-09-26 | 6 | -8/+150 |
| | | |||||
| * | Remove [:tls] email directive | Drew DeVault | 2020-09-26 | 3 | -4/+0 |
| | | |||||
| * | Free up resources throughout | Drew DeVault | 2020-09-26 | 5 | -14/+38 |
| | | |||||
| * | disconnect_client: free more client resources | Drew DeVault | 2020-09-26 | 1 | -0/+7 |
| | | |||||
| * | Implement autoindex option | Drew DeVault | 2020-09-26 | 5 | -27/+176 |
| | | |||||
| * | Rehome some logic from server.c -> serve.c | Drew DeVault | 2020-09-26 | 4 | -119/+141 |
| | | |||||
| * | Okay, time to quit fucking around with BUFSIZ | Drew DeVault | 2020-09-26 | 1 | -1/+2 |
| | | |||||
| * | Turns out BUFSIZ is small sometimes | Drew DeVault | 2020-09-26 | 1 | -2/+1 |
| | | |||||
| * | Bump client buffer size to BUFSIZ | Drew DeVault | 2020-09-26 | 2 | -2/+3 |
| | | |||||
| * | Log response body size in bytes | Drew DeVault | 2020-09-26 | 2 | -1/+5 |
| | | |||||
| * | Serve files from root | Drew DeVault | 2020-09-26 | 4 | -11/+119 |
| | | |||||
| * | disconnect_client: clean up bios | Drew DeVault | 2020-09-26 | 1 | -2/+3 |
| | | |||||
| * | Always log server messages to stderr | Drew DeVault | 2020-09-26 | 1 | -1/+1 |
| | | | | | So that you can just direct stdout to a file to get the request log. | ||||
| * | Parse requests and serve simple responses | Drew DeVault | 2020-09-26 | 3 | -19/+216 |
| | | |||||
| * | Use O_NONBLOCK for client file descriptors | Drew DeVault | 2020-09-26 | 1 | -2/+13 |
| | | |||||
| * | Implement TLS exchange with clients | Drew DeVault | 2020-09-24 | 7 | -16/+144 |
| | | | | | This probably leaves a bit to be desired tbh | ||||
