Skip to content

Commit

Permalink
Implement hijack function
Browse files Browse the repository at this point in the history
  • Loading branch information
Henri committed Sep 14, 2023
1 parent c36122e commit 92926f9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gzip.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,11 @@ func (w *GzipResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
// verify Hijacker interface implementation
var _ http.Hijacker = &GzipResponseWriter{}

// Implement the unwrap function to allow using NewResponseController
func (w *GzipResponseWriter) Unwrap() http.ResponseWriter {
return w.ResponseWriter
}

// MustNewGzipLevelHandler behaves just like NewGzipLevelHandler except that in
// an error case it panics rather than returning an error.
func MustNewGzipLevelHandler(level int) func(http.Handler) http.Handler {
Expand Down

0 comments on commit 92926f9

Please sign in to comment.