|
@ -146,7 +146,7 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request) |
|
|
if n.IsCompressed() { |
|
|
if n.IsCompressed() { |
|
|
if strings.Contains(r.Header.Get("Accept-Encoding"), "gzip") { |
|
|
if strings.Contains(r.Header.Get("Accept-Encoding"), "gzip") { |
|
|
if _, _, _, shouldResize := shouldResizeImages(ext, r); shouldResize { |
|
|
if _, _, _, shouldResize := shouldResizeImages(ext, r); shouldResize { |
|
|
if n.Data, err = util.UnCompressData(n.Data); err != nil { |
|
|
|
|
|
|
|
|
if n.Data, err = util.DecompressData(n.Data); err != nil { |
|
|
glog.V(0).Infoln("ungzip error:", err, r.URL.Path) |
|
|
glog.V(0).Infoln("ungzip error:", err, r.URL.Path) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
@ -155,7 +155,7 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
if n.Data, err = util.UnCompressData(n.Data); err != nil { |
|
|
|
|
|
|
|
|
if n.Data, err = util.DecompressData(n.Data); err != nil { |
|
|
glog.V(0).Infoln("ungzip error:", err, r.URL.Path) |
|
|
glog.V(0).Infoln("ungzip error:", err, r.URL.Path) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|