mirror of
https://github.com/restic/rest-server.git
synced 2025-12-07 09:36:13 -08:00
Add support for logging HTTP requests in the combined log format
This commit is contained in:
21
vendor/github.com/gorilla/handlers/handlers_go18.go
generated
vendored
Normal file
21
vendor/github.com/gorilla/handlers/handlers_go18.go
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
// +build go1.8
|
||||
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type loggingResponseWriter interface {
|
||||
commonLoggingResponseWriter
|
||||
http.Pusher
|
||||
}
|
||||
|
||||
func (l *responseLogger) Push(target string, opts *http.PushOptions) error {
|
||||
p, ok := l.w.(http.Pusher)
|
||||
if !ok {
|
||||
return fmt.Errorf("responseLogger does not implement http.Pusher")
|
||||
}
|
||||
return p.Push(target, opts)
|
||||
}
|
||||
Reference in New Issue
Block a user