diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-02-13 10:47:06 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-02-13 10:47:06 -0800 |
commit | 46d7c021d8de124be803b5c10f157c132343ab4e (patch) | |
tree | df0a0cc191834d9220fe5a9f952ad61c9527a43e /system/api/gzip.go | |
parent | d2240b2ea40a3073e12c4c4ab529d486fa2b99d9 (diff) |
adding check for nil pusher in gzipResponseWriter type
Diffstat (limited to 'system/api/gzip.go')
-rw-r--r-- | system/api/gzip.go | 4 |
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), |