StorageGrid compatibility (#2712)

* remove explicit Accept-Encoding header

For StorageGrid compatibility the Accept-Encoding header should not be set, otherwise StorageGrid compresses the already compressed log files which are only decompressed by the client once

Signed-off-by: fvsqr <48791253+fvsqr@users.noreply.github.com>

* Removed explicit gzip Accept-Encoding header

For StorageGrid compatibility the Accept-Encoding header should not be set, otherwise StorageGrid compresses the already compressed log files which are only decompressed by the client once.
Unclear, how this affects Backup endpoints from Azure or GCP

Signed-off-by: fvsqr <48791253+fvsqr@users.noreply.github.com>

* Create 2712-fvsqr

Signed-off-by: fvsqr <48791253+fvsqr@users.noreply.github.com>
This commit is contained in:
fvsqr
2020-07-20 19:11:26 +02:00
committed by GitHub
parent 9189cffb1c
commit 01e2dcb364
2 changed files with 1 additions and 5 deletions

View File

@@ -0,0 +1 @@
StorageGrid compatibility by removing explicit gzip accept header setting

View File

@@ -139,11 +139,6 @@ Loop:
return err
}
// Manually set this header so the net/http library does not automatically try to decompress. We
// need to handle this manually because it's not currently possible to set the MIME type for the
// pre-signed URLs for GCP or Azure.
httpReq.Header.Set("Accept-Encoding", "gzip")
resp, err := httpClient.Do(httpReq)
if err != nil {
if urlErr, ok := err.(*url.Error); ok {