Commit Graph

26 Commits

Author SHA1 Message Date
Omar Polo
91d7870bb7 typo 2021-01-30 14:38:32 +00:00
Omar Polo
1b246dbd3c remove unused target
"test" was replaced by "regress" a while ago
2021-01-30 14:37:57 +00:00
Omar Polo
44ee1bac8b use starts_with in puny.c 2021-01-27 15:35:09 +00:00
Omar Polo
3300cbe06a initial punycode support 2021-01-27 10:47:49 +00:00
Omar Polo
c6b9ddecf6 gg may need some compat 2021-01-23 17:39:12 +00:00
Omar Polo
31a4993a94 use gg instead of gg.py for the regression suite 2021-01-23 17:10:00 +00:00
Omar Polo
497977d501 add gg, a barebones Gemini client 2021-01-23 16:56:24 +00:00
Omar Polo
5c2e310ede brand new regress suite 2021-01-22 16:48:04 +00:00
Omar Polo
ac69e83aab improve install target 2021-01-21 13:50:11 +00:00
Omar Polo
12042ad700 add a configure script and some compat
tested on openbsd, alpine and void
2021-01-21 11:57:46 +00:00
Omar Polo
5bc29bc915 remove README.md target
leftover from when README.md was generated by gmid.1
2021-01-18 22:52:13 +00:00
Omar Polo
0fbe79b33c improve mime handling
we still have an hardcoded list, but this implements the API needed to
modify the mappings.
2021-01-18 18:18:57 +00:00
Omar Polo
d3a08f4d17 reorganize: move bunch of functions to server.c
cgi.c wasn't really needed; it better to group all the server related
functions together, cgi or not.  Now gmid.c contains only startup and
utility code.
2021-01-17 23:23:58 +00:00
Omar Polo
771d8f281b build docs + install and static targets 2021-01-17 12:12:37 +00:00
Omar Polo
364f10dbcd add runtime tests for the server 2021-01-17 11:34:06 +00:00
Omar Polo
881a9dd9c2 split into two processes: listener and executor
this way, we can sandbox the listener with seccomp (todo) or capsicum
(already done) and still have CGI scripts.  When we want to exec, we
tell the executor what to do, the executor executes the scripts and
send the fd backt to the listener.
2021-01-16 19:41:34 +00:00
Omar Polo
7edc455ab4 move cgi stuff to its own file 2021-01-15 19:08:28 +00:00
Omar Polo
dafb57b8af sandbox also on FreeBSD with capsicum 2021-01-15 14:03:45 +00:00
Omar Polo
1590277007 conf & vhosts
* gmid.c (main): changed behaviour: daemon off by default
(main): changed -c in -C (cert option)
(main): changed -k in -K (key option, for consistency with -C)
(main): added -c to load a configuration
(main): certs, key and doc (-C -K and -d) doesn't have a default value anymore
(handle_handshake): add vhosts support
2021-01-15 09:17:43 +00:00
Omar Polo
3c1cf9d07c s/uri/iri since we accept IRIs 2021-01-11 13:08:00 +00:00
Omar Polo
b9220ca4de new README + wording in manpage 2021-01-11 12:51:25 +00:00
Omar Polo
ef04b55160 switch to Bjoern Hoehrmann UTF-8 decoder
It's correct, while my hacked valid_multibyte_utf8 would allow things
that aren't technically UTF8.
2021-01-09 20:32:23 +00:00
Omar Polo
33d32d1fd6
implement a valid RFC3986 (URI) parser
Up until now I used a "poor man" approach: the uri parser is barely a
parser, it tries to extract the path from the request, with some minor
checking, and that's all.  This obviously is not RFC3986-compliant.

The new RFC3986 (URI) parser should be fully compliant.  It may accept
some invalid URI, but shouldn't reject or mis-parse valid URI.  (in
particular, the rule for the path is way more relaxed in this parser
than it is in the RFC text).

A difference with RFC3986 is that we don't even try to parse the
(optional) userinfo part of a URI: following the Gemini spec we treat
it as an error.

A further caveats is that %2F in the path part of the URI is
indistinguishable from a literal '/': this is NOT conforming, but due
to the scope and use of gmid, I don't see how treat a %2F sequence in
the path (reject the URI?).
2020-12-25 13:13:12 +01:00
Omar Polo
10fed44c79
improve make error message if etags is not found
the ‘|| true’ idiom leads to better make error.  Now the ‘-’ becomes a
bit redundant tho…
2020-10-07 17:59:55 +02:00
Omar Polo
4984f974cd
fixed quoting in Makefile 2020-10-02 19:46:46 +02:00
Omar Polo
3e4749f7f9
initial commit 2020-10-02 19:39:00 +02:00