1
0
mirror of https://git.sr.ht/~adnano/go-gemini synced 2025-04-29 13:07:54 +02:00
Commit Graph

21 Commits

Author SHA1 Message Date
adnano
d413fdee86 Add message argument to TimeoutHandler 2021-02-28 22:07:24 -05:00
adnano
cb659a5712 Remove ResponseWriter.Close method 2021-02-24 19:00:09 -05:00
adnano
27d11fdc94 ResponseWriter: Remove unexported method 2021-02-24 10:01:46 -05:00
adnano
95ee8cb288 TimeoutHandler: Mention returned error 2021-02-24 08:37:52 -05:00
adnano
5641357817 Add unexported method to timeout writer 2021-02-24 08:34:26 -05:00
adnano
2b3f12c85b Implement TimeoutHandler by wrapping ResponseWriter 2021-02-24 08:18:23 -05:00
adnano
755c24a366 Make ResponseWriter an interface
Make ResponseWriter an interface with an unexported method. Implementors
must embed a ResponseWriter from elsewhere. This gives us the
flexibility of an interface while allowing us to add new methods in the
future.
2021-02-24 00:13:46 -05:00
adnano
90c7bb1b32 Remove ErrHandlerTimeout 2021-02-23 22:15:19 -05:00
adnano
6f2ae1714f Move TimeoutHandler to handler.go 2021-02-23 22:12:04 -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
b76bb58fb0 handler: Mention when the context is canceled 2021-02-23 19:01:12 -05:00
adnano
eac31fa085 handler: Mention ResponseWriter.Close method 2021-02-23 18:59:20 -05:00
adnano
6614a2d3fe Use HandlerFunc to implement StatusHandler 2021-02-23 18:52:00 -05:00
adnano
9266af5090 server: Don't recover from panics 2021-02-21 11:04:45 -05:00
adnano
787b6819ac Use StatusHandler in NotFoundHandler implementation 2021-02-21 09:32:07 -05:00
adnano
480fa655e4 Rename RedirectHandler to StatusHandler 2021-02-20 16:44:42 -05:00
adnano
7a4319d473 Remove NotFound function 2021-02-20 16:42:18 -05:00
adnano
4878e04791 Make Status a type
Using a type is better than using an integer.
2021-02-20 16:16:32 -05:00
adnano
67fbda14b8 handler: Make ServeGemini accept a Context 2021-02-20 15:49:14 -05:00
adnano
6f1cf05d01 Reverse order of RedirectHandler arguments 2021-02-17 19:53:00 -05:00
adnano
30d07f07e6 Add utility Handler functions 2021-02-17 19:27:25 -05:00