Revert "Use go:generate to set version number"
This reverts commit bfce1d9be12c36e805573ad26dc3fa5f548cd881.
It did not work as I thought it might (go install still doesn't set the
version correctly), so I'm reverting this to the old version.
Use go:generate to set version number
I'm hoping (but not sure!) this will fix the version number of the
program when installed using "go install". Currently, installing through
"go install" does not set the version number (because makefile is not
Redirect to canonical URLs
URLs referring to a directory should always end in a slash. URLs
referring to a file should never end in a slash. We now redirect to the
The reason this is important is that incorrect URLs can result to broken
relative links. For example, if the page at gemini://example.org/gemlog/
has a relative link to post.gmi, and we drop the trailing slash (so it
ends with "gemlog", instead of "gemlog/"), the link to post.gmi would
refer to "gemini://example.org/post.gmi" instead of
Fix bug where SNI never matched hostname
Apparently we needed to read SNI at a later stage. Reading it that
early, the field was just an empty string.
Fix bug in route matching
Change repo name to sr.ht
Slightly improve SNI logging
Check url scheme. Log sni.
Do not modify request URL when matching
We were modifying the passed URL in GetBackendByUrl, which cause an
incomplete URL be passed to CGI scripts (queries removed, etc).
Requests were not being passed to CGI scripts
Check hostname against SNI
Fix bug in error responses
Add content-type detection based on file extension
Rename the project to Hodhod