Commit Briefs

Omar Polo

add ability to proxy requests

Add to gmid the ability to forwad a request to another gemini server and thus acting like a reverse proxy. The current syntax for the config file is server "example.com" { ... proxy relay-to host:port } Further options (like the use of custom certificates) are planned. cf. github issue #7


omar-polo

Implement OCSP stapling support

Currently dogfooding this patch at gemini.sgregoratto.me. To test, run the following command and look for the "OCSP response" header: openssl s_client -connect "gemini.sgregoratto.me:1965" -status


Omar Polo

two -n to dump the parsed configuration

This adds a barebone dumping of the parsed configuration. It is not complete, but I'm interested in dumping the full path to `cert' and `key' in order to write some scripts that can inspect the configuration, extract the certificates and renew them when expired automatically. It's not easy to parse gmid configuration otherwise because the syntax is flexible and users can use macros. Instead, the idea is to run gmid and let it dump the configuration once it's been parsed in a static and predictable format. Now is possible to parse gmid configuration with, say, awk or perl.


Omar Polo

don't yyerror if we can't open the file

the global var file could still be NULL and yyerror would crash.


Omar Polo

typo


Omar Polo

drop leading T from token names


Omar Polo

sort tokens


Omar Polo

contrib/vim: add Syntastic integration

Error and warning messages are prefixed with "error: " and "warning: " correspondingly to ease integration with automated tooling. `yywarn' function added. Off-by-one line numbers in warnings are fixed. Two error messages are reworded to avoid repeating like "error: error in server directive" or "error: syntax error".


Omar Polo

move parse_portno to gmid.c

it's used only to parse the -p flag. While there add check_port_num to check the range for the port.



Omar Polo

drop unsigned

it causes a cascade of warnings on some architectures. Also, for what we're doing here, the signed/unsigned property isn't important.


Omar Polo

@-macros, rollback changes to strings and optional semicolons

* expand $-macros as string, only the new @-macros get expanded as-is * rollback changes to characters allowed in bare strings * optional semicolons in optnl, useful for readable @-macros


Omar Polo

parsing: bring lots of goodies from OpenBSD' parse.y

This allows to solve the problem with the \n in the grammar (before two following macro declaration were treated as invalid. This also brings in a nice `include' keyword.


Omar Polo

change (again) the env/param separator: use '='

Given that env/param are new features of this release, no support for the "old" syntax is needed.


Omar Polo

add => in env/param and `port' between hostname and port for fastcgi

In the same spite of the last commit, add the missing separators between strings to avoid the auto-concat pitfalls. `=>' is used to separate between `env' and `param' arguments, while for `fastcgi' the keyword `port' is required between the hostname/ip address and the port (if provided). Since `env', `param' and `fastcgi' are all new stuff, there's no need to keep compatibility.