Change the default object content-type to binary/octet-stream (#11508)

This commit is contained in:
Anis Elleuch 2021-02-10 17:56:37 +01:00 committed by GitHub
parent b87fae0049
commit 682482459d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -45,7 +45,7 @@ const (
// Include-list for compression.
DefaultExtensions = ".txt,.log,.csv,.json,.tar,.xml,.bin"
DefaultMimeTypes = "text/*,application/json,application/xml"
DefaultMimeTypes = "text/*,application/json,application/xml,binary/octet-stream"
)
// DefaultKVS - default KV config for compression settings

View file

@ -128,7 +128,7 @@ func extractMetadata(ctx context.Context, r *http.Request) (metadata map[string]
// Set content-type to default value if it is not set.
if _, ok := metadata[strings.ToLower(xhttp.ContentType)]; !ok {
metadata[strings.ToLower(xhttp.ContentType)] = "application/octet-stream"
metadata[strings.ToLower(xhttp.ContentType)] = "binary/octet-stream"
}
// https://github.com/google/security-research/security/advisories/GHSA-76wf-9vgp-pj7w