Browse Source

Merge branch '_save_content_encoding' into _product

pull/5936/head
changlin.shi 2 years ago
parent
commit
82a535e9dd
  1. 7
      weed/s3api/s3api_object_handlers.go

7
weed/s3api/s3api_object_handlers.go

@ -411,6 +411,13 @@ func (s3a *S3ApiServer) proxyToFiler(w http.ResponseWriter, r *http.Request, des
s3a.maybeAddFilerJwtAuthorization(proxyReq, isWrite)
resp, postErr := s3a.client.Do(proxyReq)
if resp.Uncompressed && r.Header.Get("Accept-Encoding") == "" {
r.Header.Set("Accept-Encoding", "gzip")
util.CloseResponse(resp)
s3a.proxyToFiler(w, r, destUrl, false, passThroughResponse)
return
}
if postErr != nil {
glog.Errorf("post to filer: %v", postErr)
s3err.WriteErrorResponse(w, r, s3err.ErrInternalError)

Loading…
Cancel
Save