server: Don't recover from panics

This commit is contained in:
Adnan Maolood
2021-02-21 11:04:28 -05:00
parent a606c4fcc0
commit bb444fb364
3 changed files with 0 additions and 23 deletions

View File

@@ -14,13 +14,6 @@ import (
// of the ServeGemini call.
//
// Handlers should not modify the provided Request.
//
// If ServeGemini panics, the server (the caller of ServeGemini) assumes that
// the effect of the panic was isolated to the active request. It recovers
// the panic, logs a stack trace to the server error log, and closes the
// network connection. To abort a handler so the client sees an interrupted
// response but the server doesn't log an error, panic with the value
// ErrAbortHandler.
type Handler interface {
ServeGemini(context.Context, ResponseWriter, *Request)
}