mirror of
https://github.com/labstack/echo.git
synced 2025-02-03 13:11:39 +02:00
make gzipResponseWriter implement http.Pusher (#1615)
This commit is contained in:
parent
d3245067e0
commit
8dd25c39ce
@ -119,3 +119,10 @@ func (w *gzipResponseWriter) Flush() {
|
||||
func (w *gzipResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
||||
return w.ResponseWriter.(http.Hijacker).Hijack()
|
||||
}
|
||||
|
||||
func (w *gzipResponseWriter) Push(target string, opts *http.PushOptions) error {
|
||||
if p, ok := w.ResponseWriter.(http.Pusher); ok {
|
||||
return p.Push(target, opts)
|
||||
}
|
||||
return http.ErrNotSupported
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user