1
0
mirror of https://git.sr.ht/~adnano/go-gemini synced 2024-11-26 10:23:45 +01:00
Commit Graph

586 Commits

Author SHA1 Message Date
adnano
bc235d4534 certificate.Store: Remove client certificate support 2021-02-23 08:37:05 -05:00
adnano
5e1b4015ff client: Document use of contexts 2021-02-22 21:35:02 -05:00
adnano
da88776f1d server: Document use of contexts 2021-02-22 21:33:23 -05:00
adnano
c9eb24bd95 server: Remove unused constants 2021-02-22 21:28:18 -05:00
adnano
89a35924a0 server: Return context.Canceled after Shutdown 2021-02-22 21:27:44 -05:00
adnano
282120c368 examples/stream: Remove /shutdown handler 2021-02-22 21:16:13 -05:00
adnano
caf7d5f9be examples/server: Shutdown on interrupt signal 2021-02-22 21:14:41 -05:00
adnano
941a2e719a server: Revert to closing contexts on Shutdown 2021-02-22 21:13:44 -05:00
adnano
6d26abd514 examples/stream: Remove usage of Flusher 2021-02-22 20:07:37 -05:00
adnano
6f2571d626 server: Use channel to communicate shutdown 2021-02-22 20:06:19 -05:00
adnano
ff53535185 Rename ResponseWriter.MediaType to SetMediaType 2021-02-21 18:52:06 -05:00
adnano
65b7f95b30 client: Remove Timeout
Clients should use context.WithTimeout instead.
2021-02-21 16:47:56 -05:00
adnano
122fd434d6 Move Flush back to ResponseWriter 2021-02-21 16:06:56 -05:00
adnano
4a6d84fc03 server: Don't close pending connections after Shutdown 2021-02-21 16:05:10 -05:00
adnano
5df461b9ee server: Export ServeConn method 2021-02-21 11:53:15 -05:00
adnano
61eef35c92 server: Don't recover from panics 2021-02-21 11:04:45 -05:00
adnano
f86f8efdae fs: Use better error messages 2021-02-21 09:56:59 -05:00
adnano
787a2445a8 Move punycode functions to client.go 2021-02-21 09:43:23 -05:00
adnano
b90b5bf2dc client: Copy only what is needed from the Request 2021-02-21 09:41:00 -05:00
adnano
070c258c8d Use StatusHandler in NotFoundHandler implementation 2021-02-21 09:32:07 -05:00
adnano
68c2dddf74 fs: Remove unused context arguments 2021-02-21 09:29:21 -05:00
adnano
14a977907b Add ErrCertificateExpired 2021-02-21 09:27:12 -05:00
adnano
98ea5a52b8 Remove unused ErrInvalidURL 2021-02-21 09:23:30 -05:00
adnano
0a51cbff35 Update documentation 2021-02-21 00:56:37 -05:00
adnano
5adc35a05a server: Return ErrServerClosed 2021-02-21 00:51:02 -05:00
adnano
1b5464e2c4 server: Use separate context to cancel listeners
Use a separate context to cancel listeners so that cancelling the
listener does not cancel it's connections.
2021-02-21 00:41:41 -05:00
adnano
86c4b74e04 examples/stream: Showcase Server.Shutdown method 2021-02-21 00:29:41 -05:00
adnano
a54d4e1a56 examples: Use context 2021-02-21 00:26:30 -05:00
adnano
707d196373 server: Use explicit context arguments
Replace the Server.Context field with explicit context.Context arguments
to most Server functions.
2021-02-21 00:21:31 -05:00
adnano
64da10e804 client: Inline result type 2021-02-21 00:20:42 -05:00
adnano
da9e14478b server: Add Context field 2021-02-20 18:52:33 -05:00
adnano
7882f1dbf0 Update examples 2021-02-20 18:30:49 -05:00
adnano
28dd6017c8 certificate.Store: Support "*" wildcard pattern 2021-02-20 18:26:15 -05:00
adnano
0c30cc7590 certificate.Store: Generate certificates by default 2021-02-20 18:25:02 -05:00
adnano
3c07af62f7 server: Populate Request.Host field 2021-02-20 18:12:51 -05:00
adnano
916bcce782 mux: Use StatusHandler instead of RedirectHandler 2021-02-20 16:45:37 -05:00
adnano
e4b704c9b1 Rename RedirectHandler to StatusHandler 2021-02-20 16:44:42 -05:00
adnano
51e324303b Remove NotFound function 2021-02-20 16:42:18 -05:00
adnano
b19cfcad16 server: Make Request.RemoteAddr a net.Addr
A concrete type is better.
2021-02-20 16:27:35 -05:00
adnano
9318ba666b Make Status a type
Using a type is better than using an integer.
2021-02-20 16:16:32 -05:00
adnano
eba01b5e29 TimeoutHandler: Use provided context 2021-02-20 15:52:54 -05:00
adnano
2c69b88153 handler: Make ServeGemini accept a Context 2021-02-20 15:49:14 -05:00
adnano
002df3f8b2 examples/client: Remove dependency on go-xdg 2021-02-20 15:42:06 -05:00
adnano
46c4ad1848 examples/client: Use context 2021-02-20 15:39:47 -05:00
adnano
bb51cd4eb6 client: Make Get and Do accept a Context
This removes the need for Request.Context.
2021-02-20 15:34:21 -05:00
adnano
e3cb6a067e server: Make Request.RemoteAddr a string 2021-02-20 13:31:55 -05:00
adnano
180605cd5f client: Allow Request.Host to omit a port 2021-02-20 13:30:55 -05:00
adnano
436c844007 Implement TimeoutHandler 2021-02-20 00:49:21 -05:00
adnano
1e6a3c326d server: Clarify GetCertificate documentation 2021-02-19 18:53:06 -05:00
adnano
8783d3109e examples/server: Use certificate.Store 2021-02-19 18:45:19 -05:00