summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-02-13 10:47:06 -0800
committerSteve Manuel <nilslice@gmail.com>2017-02-13 10:47:06 -0800
commit46d7c021d8de124be803b5c10f157c132343ab4e (patch)
treedf0a0cc191834d9220fe5a9f952ad61c9527a43e
parentd2240b2ea40a3073e12c4c4ab529d486fa2b99d9 (diff)
adding check for nil pusher in gzipResponseWriter type
-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),