summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/api/gzip.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/system/api/gzip.go b/system/api/gzip.go
index 9f50cf7..be5a51b 100644
--- a/system/api/gzip.go
+++ b/system/api/gzip.go
@@ -48,6 +48,10 @@ func (gzw gzipResponseWriter) Write(p []byte) (int, error) {
}
func (gzw gzipResponseWriter) Push(target string, opts *http.PushOptions) error {
+ if gzw.pusher == nil {
+ return nil
+ }
+
if opts == nil {
opts = &http.PushOptions{
Header: make(http.Header),