1
0
mirror of https://git.sr.ht/~sircmpwn/gmnisrv synced 2024-06-08 17:30:43 +00:00
Commit Graph

13 Commits

Author SHA1 Message Date
René Wagner
32913c35cd implement handling of ROUTE_EXACT definitions
This patchset implements the handling of exact routes
as described in gmnisrvini(5).
2021-01-29 08:55:43 -05:00
William Casarin
d484ba0ab0 config/routing: fix maybe-uninitialized errors
Trivial fix to silence compilation errors on gcc 9.3.0:

  src/config.c: In function ‘conf_ini_handler’:
  src/config.c:154:23: error: ‘routing’ may be used uninitialized in this
  function [-Werror=maybe-uninitialized]
    154 |  enum gmnisrv_routing routing;
        |                       ^~~~~~~

  src/config.c:197:18: error: ‘spec’ may be used uninitialized in this
  function [-Werror=maybe-uninitialized]
    197 |    route->path = strdup(spec);
        |                  ^~~~~~~~~~~~

Signed-off-by: William Casarin <jb55@jb55.com>
2020-11-02 12:29:19 -05:00
Drew DeVault
dc6e4e80c0 Implement URL rewrites with regex capture groups 2020-11-01 11:19:51 -05:00
Drew DeVault
7e8a953794 Initial pass on regex routing support
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.
2020-10-29 22:47:56 -04:00
Drew DeVault
077b96d3cc config: free more routing information on finish 2020-10-28 12:43:05 -04:00
Drew DeVault
cc1bd152e3 Initial support for CGI scripts 2020-10-25 23:16:50 -04:00
Drew DeVault
8baeb5a51c Initial implementation of a routing table 2020-10-25 21:46:01 -04:00
Drew DeVault
fc036335eb Remove [:tls] email directive 2020-09-26 16:41:11 -04:00
Drew DeVault
50d21c03f5 Free up resources throughout 2020-09-26 16:10:10 -04:00
Drew DeVault
6bc9c4deb9 Implement autoindex option 2020-09-26 15:51:28 -04:00
Drew DeVault
65c2a56c6d Initialize sockets 2020-09-23 12:43:05 -04:00
Drew DeVault
9adc6f34c7 config: parse listen directives 2020-09-23 11:33:05 -04:00
Drew DeVault
58500c8e53 Initial config parser 2020-09-23 11:24:23 -04:00