强制Google Cloud存储使用内容编码进行响应

时间:2019-02-24 01:13:30

标签: http-headers google-cloud-storage gzip unreal-engine4 content-encoding

我想使用Google Cloud Storage提供一些虚幻生成的HTML5文件。其中一些文件是gzip编码的,并且其中一个javascript文件检查以gz返回的每个以Content-Encoding: gzip结尾的文件。我不想更改这些文件。

在GC UI中,我在文件元数据中设置了Content-Encoding(和Content-type)字段。为了防止解压缩转码,我还设置了Cache-Control:no-transform。尽管如此,仍缺少Content-Encoding标头。 (下面的完整标题)。我还能做些其他事情来使Google Cloud响应Content-Encoding吗?

HTTP/1.0 200 OK
X-GUploader-UploadID: some hash
Date: Sun, 24 Feb 2019 01:06:05 GMT
Cache-Control: no-transform
Expires: Mon, 24 Feb 2020 01:06:05 GMT
Last-Modified: Sun, 24 Feb 2019 00:52:29 GMT
x-goog-generation: 1550969549021835
x-goog-metageneration: 3
x-goog-stored-content-encoding: gzip
x-goog-stored-content-length: 99750206
Content-Type: application/octet-stream
x-goog-hash: crc32c=oobjmg==
x-goog-hash: md5=fN6srk43sVaYDVNgpXtdLQ==
x-goog-storage-class: REGIONAL
Accept-Ranges: none
Server: UploadServer
Vary: Accept-Encoding

0 个答案:

没有答案