Commit Graph

584 Commits

Author SHA1 Message Date
4985bf0bc8 Add link to ogirinal in readme 2023-05-26 00:45:08 -04:00
f6d3c47816 Export TLS & remove conn in request struct
This makes it possible to fully create another request outside of this module
(which Hnakra will need) and has better parity with net/http.
2023-05-26 00:38:12 -04:00
24d70951c9 Change package URL in go.mod 2023-05-26 00:37:56 -04:00
b436ec8cb5 Change import paths 2023-05-25 18:45:53 -04:00
54f7209f13 Update readme 2023-05-25 18:27:52 -04:00
Adnan Maolood
b0f27c6f74 fs: Prevent invalid directory links
A file with a name like "gemini:example" would previously result in the
following invalid link:

    => gemini:example gemini:example

Fix by prepending a "./" before each filename, so that the resulting
link looks like:

    => ./gemini:example gemini:example
2022-05-07 13:54:56 -04:00
Yujiri
8c0af18617 Fix parsing of list item lines
According to section 5.5.2 of the Gemini specification (v0.16.1), the
space is mandatory.
2022-03-15 11:07:04 -04:00
Adnan Maolood
353416685a doc: Fix Mux documentation 2022-02-16 12:01:55 -05:00
Adnan Maolood
0ceec22705 readme: Update Gemini specification version 2021-12-18 12:51:04 -05:00
Adnan Maolood
3d2110d90f mux: Tweak documentation 2021-06-26 20:26:30 -04:00
Adnan Maolood
b5c47a5ef0 mux: Add more tests 2021-06-26 20:16:38 -04:00
Adnan Maolood
fb0d4d24bd mux: Remove support for handling schemes
Also fix redirection to subtree roots for wildcard patterns and patterns
without a host name.
2021-06-26 18:50:09 -04:00
Adnan Maolood
1170e007d4 fs: Avoid equality check if lengths don't match 2021-04-21 12:48:27 -04:00
Adnan Maolood
c85759d777 fs: Improve redirect behavior 2021-04-21 12:41:56 -04:00
Adnan Maolood
507773618b fs: Refactor 2021-04-21 12:18:52 -04:00
Adnan Maolood
3bc243dd66 fs: Remove ServeContent function 2021-04-21 11:41:40 -04:00
Adnan Maolood
de93d44786 LoggingMiddleware: Prevent writing empty meta 2021-04-21 11:38:34 -04:00
Adnan Maolood
eb32c32063 fs: Fix panic on indexing URL of zero length 2021-04-21 11:36:43 -04:00
Adnan Maolood
e5cf345273 Update README.md 2021-03-24 13:30:46 -04:00
Adnan Maolood
c68ce57488 mux: Add copyright notice 2021-03-24 13:09:53 -04:00
Adnan Maolood
2b161650fe Split LICENSE into two files 2021-03-24 13:08:32 -04:00
Adnan Maolood
dbbef1fb6d Revert "Require Go 1.16"
This reverts commit 0e87d64ffc.
2021-03-23 22:05:12 -04:00
Adnan Maolood
90518a01a8 Revert "Replace uses of ioutil with io"
This reverts commit 19f1d6693e.
2021-03-23 22:02:32 -04:00
Adnan Maolood
056e55abbb response: Remove unnecessary length check 2021-03-20 18:29:40 -04:00
Adnan Maolood
72d437c82e response: Limit response header size 2021-03-20 14:01:45 -04:00
Adnan Maolood
3dca29eb41 response: Don't use bufReadCloser 2021-03-20 13:41:53 -04:00
Adnan Maolood
a40b5dcd0b fs: Fix empty media type for directory index pages 2021-03-20 13:33:15 -04:00
Adnan Maolood
fffe86680e client: Only get cert if TrustCertificate is set 2021-03-20 12:54:41 -04:00
Adnan Maolood
d5af32e121 client: Close connection on error 2021-03-20 12:49:27 -04:00
Adnan Maolood
5141eaafaa Tweak request and response parsing 2021-03-20 12:27:20 -04:00
Adnan Maolood
e5c0afa013 response: Treat empty meta as invalid 2021-03-20 12:07:24 -04:00
Adnan Maolood
4c7c200f92 Remove unused field 2021-03-20 12:05:21 -04:00
Adnan Maolood
0a709da439 Remove charset=utf-8 from default media type 2021-03-20 12:04:42 -04:00
Adnan Maolood
1fdef9b608 Rename ServeMux to Mux 2021-03-15 15:44:35 -04:00
Adnan Maolood
2144e2c2f2 status: Reintroduce StatusSensitiveInput 2021-03-15 15:19:43 -04:00
Adnan Maolood
93a606b591 certificate.Store: Call os.MkdirAll on Load 2021-03-09 08:59:28 -05:00
Adnan Maolood
b00794f236 tofu: Use stricter file permissions 2021-03-09 08:58:36 -05:00
Noah Kleiner
3da7fe7cee tofu: Create path if not exists
This commit is a follow-up to 56774408 which does not take into account
the case that the parent directory of the known_hosts file does not already exist.
2021-03-09 08:50:42 -05:00
Adnan Maolood
dea7600f29 Remove StatusSensitiveInput 2021-03-08 14:08:45 -05:00
Adnan Maolood
7d958a4798 examples/client: Fix certificate trust check 2021-03-08 14:07:18 -05:00
Adnan Maolood
a5493b708a tofu: Fix known host unmarshaling 2021-03-06 15:49:11 -05:00
Adnan Maolood
6e5c2473e7 tofu: Use base64-encoded sha256 fingerprints 2021-03-06 15:24:15 -05:00
Adnan Maolood
c639233ea1 tofu: Fix format in error message 2021-03-06 15:13:06 -05:00
Adnan Maolood
5677440876 tofu: Automatically create file in KnownHosts.Load 2021-03-06 15:11:30 -05:00
Adnan Maolood
be3d09d7f4 certificate.Store: Don't call os.MkdirAll 2021-03-06 13:11:11 -05:00
Adnan Maolood
504da9afd8 certificate.Store: Don't check parent scopes in Lookup
Limit the scopes of client certificates to hostnames only instead of
hostnames and paths.
2021-03-06 12:59:33 -05:00
Adnan Maolood
d1cb8967b6 certificate.Store: Make 100 years the default duration 2021-03-05 23:29:56 -05:00
Adnan Maolood
107b3a1785 Move LoggingMiddleware out of examples/server.go 2021-03-05 11:35:01 -05:00
Adnan Maolood
e7a06a12bf certificate.Store: Clean scope path in Load
Clean the scope path so that trimming the path from the scope works for
relative paths.
2021-03-05 10:51:55 -05:00
Adnan Maolood
649b20659b Revert "certificate: Remove Subject from CreateOptions"
This reverts commit ce649ecc66.
2021-03-04 20:04:46 -05:00