1
0
mirror of https://git.sr.ht/~adnano/go-gemini synced 2025-08-23 20:34:40 +02:00
Commit Graph

142 Commits

Author SHA1 Message Date
adnano
f092f13333 server: Fix comment 2021-02-24 08:38:08 -05:00
adnano
804d2b5da1 Move ResponseWriter Conn and TLS methods to Request 2021-02-24 08:24:49 -05:00
adnano
9f8dd94b9b Unexport NewResponseWriter 2021-02-23 22:02:47 -05:00
adnano
6806262b42 ResponseWriter: Add TLS and Conn methods 2021-02-23 20:59:04 -05:00
adnano
bccd77b81d request: Remove TLS and Conn methods 2021-02-23 20:57:53 -05:00
adnano
c8c15d4ffd Make ResponseWriter a struct
Make ResponseWriter a struct again so that it can be extended in a
backwards-compatible way.
2021-02-23 20:41:16 -05:00
adnano
dd0c1fd90f Update documentation 2021-02-23 18:45:58 -05:00
adnano
4cbb93bc93 request: Add Conn and TLS methods 2021-02-23 17:29:50 -05:00
adnano
619f9a4398 server: Cancel context on IO errors 2021-02-23 16:06:57 -05:00
adnano
917f85bb23 server: Document use of context in ListenAndServe 2021-02-23 12:10:55 -05:00
adnano
49abd226f9 server: Make ErrorLog an interface 2021-02-23 11:10:35 -05:00
adnano
950bfa0d86 server: Fix Shutdown with no active listeners
Shutdown and Close will hang if there are no active listeners or
connections. Try to close the done channel to avoid that.
2021-02-23 09:28:14 -05:00
adnano
173cb3aa0d server: Mention certificate store 2021-02-23 09:08:44 -05:00
adnano
42b145e744 server: Document use of contexts 2021-02-22 21:33:23 -05:00
adnano
12aa08da87 server: Remove unused constants 2021-02-22 21:28:18 -05:00
adnano
fb4605250e server: Return context.Canceled after Shutdown 2021-02-22 21:27:44 -05:00
adnano
89e4a5809e server: Revert to closing contexts on Shutdown 2021-02-22 21:13:44 -05:00
adnano
0d38f80e6d server: Use channel to communicate shutdown 2021-02-22 20:06:19 -05:00
adnano
2dc96eb7dd server: Don't close pending connections after Shutdown 2021-02-21 16:05:10 -05:00
adnano
2c8fc7d792 server: Export ServeConn method 2021-02-21 11:53:15 -05:00
adnano
9266af5090 server: Don't recover from panics 2021-02-21 11:04:45 -05:00
adnano
756fcb7b98 server: Return ErrServerClosed 2021-02-21 00:51:02 -05:00
adnano
7292853155 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
a2438e5172 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
f1ac92adad server: Add Context field 2021-02-20 18:52:33 -05:00
adnano
604a3ff084 server: Populate Request.Host field 2021-02-20 18:12:51 -05:00
adnano
db3375b5fe server: Make Request.RemoteAddr a net.Addr
A concrete type is better.
2021-02-20 16:27:35 -05:00
adnano
67fbda14b8 handler: Make ServeGemini accept a Context 2021-02-20 15:49:14 -05:00
adnano
9854ace7aa server: Make Request.RemoteAddr a string 2021-02-20 13:31:55 -05:00
adnano
6f99005a23 server: Clarify GetCertificate documentation 2021-02-19 18:53:06 -05:00
adnano
41a04a5db0 server: Remove Certificates field
Use GetCertificate to retrieve certificates without consulting
Certificates.
2021-02-18 22:22:20 -05:00
adnano
4d2b18a7a7 server: Add Handler field and remove Handle methods 2021-02-17 20:31:03 -05:00
adnano
30d07f07e6 Add utility Handler functions 2021-02-17 19:27:25 -05:00
adnano
1dd0e07911 Redesign ResponseWriter interface 2021-02-17 13:36:16 -05:00
adnano
0145d40cc6 Move ResponseWriter.Flush to Flusher interface 2021-02-17 11:44:13 -05:00
adnano
9c66f1f07b server: Prevent adding Listeners after Close
Check done after calling trackListener to prevent the listener from
being registered after the server is closed.
2021-02-15 20:19:44 -05:00
adnano
57d1189e56 server: Avoid creating a new Listener after Close 2021-02-15 20:16:32 -05:00
adnano
8867fadedf server: Use separate mutex for handlers 2021-02-15 20:05:47 -05:00
adnano
70eb5c2b9d server: Rename responder to handler 2021-02-15 01:15:23 -05:00
adnano
4392a16009 server: Recover from ServeGemini panics 2021-02-15 00:36:33 -05:00
adnano
ecc0a8e32a server: Implement Close and Shutdown methods 2021-02-14 23:58:33 -05:00
adnano
b0c967159e server: Don't populate Request.Certificate field
Handlers should instead use the certificate provided in Request.TLS.
2021-02-14 17:34:57 -05:00
adnano
a53c466217 Update documentation 2021-02-14 15:50:41 -05:00
adnano
59bc31103b server: Populate Request.RemoteAddr field 2021-02-13 21:10:19 -05:00
adnano
80fdfa7dea Make ResponseWriter an interface 2021-02-09 09:46:18 -05:00
adnano
bddf3bdb45 Rename Responder to Handler 2021-02-08 12:50:52 -05:00
adnano
79fa475bcf Make TLS field nil for unencrypted connections 2021-02-08 12:32:49 -05:00
adnano
8f72c334df server: Allow handling any hostname with "*"
Allow registering a responder with the special pattern "*" to handle any
hostname.
2021-01-25 10:55:40 -05:00
adnano
55b39fe06b server: Rename Register to Handle 2021-01-14 22:12:07 -05:00
adnano
df1c30e36a Move cert.go to a subpackage 2021-01-14 20:42:12 -05:00