mirror of
https://git.sr.ht/~adnano/go-gemini
synced 2024-11-23 12:42:13 +01:00
Remove ErrHandlerTimeout
This commit is contained in:
parent
2d5b0df001
commit
06dc7eed08
@ -17,10 +17,6 @@ var (
|
||||
// when the response status code does not permit a body.
|
||||
ErrBodyNotAllowed = errors.New("gemini: response status code does not allow body")
|
||||
|
||||
// ErrHandlerTimeout is returned on ResponseWriter Write calls
|
||||
// in handlers which have timed out.
|
||||
ErrHandlerTimeout = errors.New("gemini: Handler timeout")
|
||||
|
||||
// ErrHijacked is returned by ResponseWriter.Write calls when
|
||||
// the underlying connection has been hijacked using the
|
||||
// Hijacker interface. A zero-byte write on a hijacked
|
||||
|
@ -79,8 +79,7 @@ func StripPrefix(prefix string, h Handler) Handler {
|
||||
//
|
||||
// The new Handler calls h.ServeGemini to handle each request, but
|
||||
// if a call runs for longer than its time limit, the handler responds with a
|
||||
// 40 Temporary Failure error. After such a timeout, writes by h to its
|
||||
// ResponseWriter will return ErrHandlerTimeout.
|
||||
// 40 Temporary Failure error.
|
||||
func TimeoutHandler(h Handler, dt time.Duration) Handler {
|
||||
return &timeoutHandler{
|
||||
h: h,
|
||||
|
Loading…
Reference in New Issue
Block a user