mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-07-20 22:38:07 +03:00
Fix write http status after response sent
This commit is contained in:
@@ -93,7 +93,9 @@ func (s *Server) fallbackRequest(ctx context.Context, writer http.ResponseWriter
|
||||
} else if fErr == os.ErrInvalid {
|
||||
fErr = nil
|
||||
}
|
||||
writer.WriteHeader(statusCode)
|
||||
if statusCode > 0 {
|
||||
writer.WriteHeader(statusCode)
|
||||
}
|
||||
s.handler.NewError(request.Context(), E.Cause(E.Errors(err, E.Cause(fErr, "fallback connection")), "process connection from ", request.RemoteAddr))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user