1

GoogleCloudStorageでFireFoxプラグインをホストしています。FireFoxで適切に処理するには、Content-Typeをapplication/x-xpinstallに設定する必要があります。

私は次のようにアップロードしました:

gsutil -h "Content-Type: application/x-xpinstall" cp -a public-read \
   ActivityInfo.xpi gs://download.activityinfo.org

標準エンドポイントからアクセスすると、すべてが正しくなります。

$ curl -s -D - http://commondatastorage.googleapis.com/download.activityinfo.org/ActivityInfo.xpi \ 
     -o /dev/null

HTTP/1.1 200 OK
Server: HTTP Upload Server Built on Feb 13 2013 15:53:33 (1360799613)
Expires: Thu, 28 Feb 2013 12:38:30 GMT
Date: Thu, 28 Feb 2013 11:38:30 GMT
Last-Modified: Thu, 28 Feb 2013 11:38:01 GMT
ETag: "1ee983889c947a204eab4db6902c9a67"
x-goog-generation: 1362051481261000
x-goog-metageneration: 1
Content-Type: application/x-xpinstall
Content-Language: en
x-goog-crc32c: a11b93ab
Accept-Ranges: bytes
Content-Length: 5562
Cache-Control: public, max-age=3600, no-transform
Age: 491

しかし、カスタムドメインdownload.activityinfo.orgからアクセスしようとすると、ヘッダーがapplication/octet-streamに戻ります。

$ curl -s -D - http://download.activityinfo.org/ActivityInfo.xpi -o /dev/null       
HTTP/1.1 200 OK
Server: HTTP Upload Server Built on Feb 13 2013 15:53:33 (1360799613)
Expires: Thu, 28 Feb 2013 12:10:24 GMT
Date: Thu, 28 Feb 2013 11:10:24 GMT
Last-Modified: Wed, 27 Feb 2013 20:36:24 GMT
ETag: "1ee983889c947a204eab4db6902c9a67"
x-goog-generation: 1361997384772000
x-goog-metageneration: 2
Content-Type: application/octet-stream
x-goog-crc32c: a11b93ab
Accept-Ranges: bytes
Content-Length: 5562
Cache-Control: public, max-age=3600, no-transform
Age: 2298

ドキュメントに従ってCNAMEをc.storage.googleapis.comに設定しました

$ nslookup download.activityinfo.org
Non-authoritative answer:
Server:  Comtrend.Home
Address:  192.168.1.1

Name:    storage.l.googleusercontent.com
Addresses:  2a00:1450:400c:c00::80
          173.194.78.128
Aliases:  download.activityinfo.org
         c.storage.googleapis.com

これはバグですか、それとも構成を変更する必要がありますか?

4

1 に答える 1

1

上記の 2 つの結果では、x-goog-generation と x-goog-metageneration の値が異なります。これは、オブジェクトを複数回アップロードし、異なるバージョン (Content-タイプ)。バケットのバージョニングを有効にしていますか? そうでない場合は、パスの 1 つでキャッシングが行われている可能性があります。この動作はまだ見られますか?

于 2013-03-05T07:31:12.387 に答える