iri: don't error on a '..' component at the start of the path I choose to out of paranoia, but the algorithm defined in RFC3986 allows for them. So, we should rather remove the leading '..' component and continue to handle the rest of the path. Fixes

remove stale comment

refactor path_clean() Instead of doing multiple passes over the string use a modified version canonpath() from kern_pledge.c that does all in a single go.

iri: add support for raw IPv6 addresses

more is*() unsigned char cast continuation of 6130e0eeac9db4fa8e6fe5934ec2d0ab202f979e

add an implicit fastcgi parameter: GEMINI_SEARCH_STRING it’s the QUERY_STRING decoded if it’s a search-string (i.e. not a key-value pair.) It’s useful for scripts to avoid percent-decoding the querystring in the most common case of a query, because in Gemini querystrings key-value paired are not common. Idea from a discussion with Allen Sobot.

always cast is*() arguments to unsigned char

copyright years

encode file names in the directory index Spotted the hard way by cage

bugfix: allow @ and : in paths gmid would disallow the '@' and ':' characters in paths (unless percent-encoded.) Issue reported by freezr.


drop now unused trim_req_iri

change struct initialization makes more explicit which fields we're setting. (and kill an extra empty line)

use memset(3) rather than bzero(3) There's no difference, but bzero(3) says STANDARDS The bzero() function conforms to the X/Open System Interfaces option of the IEEE Std 1003.1-2004 (“POSIX.1”) specification. It was removed from the standard in IEEE Std 1003.1-2008 (“POSIX.1”), which recommends using memset(3) instead. so here we are.