Content-Encoding header not removing from object metadata of Google Storage

I am trying to add a functionality for metadata data on Google Storage Object. I am able to add metadata but while updating metadata ( modify the value as well as removing existing metadata) I am facing problem.

When I Upload a file like mydata.txt, after successfully upload - it had following metadata default -

{ETag="0b1c673f22f98d9862a8198741f0d364",
 hash=md5=CxxnPyL5jZhiqBmHQfDTZA==,
 Content-Length=85515,
 Expires=Fri, 23 Aug 2013 10:08:56 GMT,
 Last-Modified=Thu Aug 22 15:27:58 IST 2013,
 **stored-content-encoding=identity**,
 Cache-Control=private,
 max-age=0,
 Date=Fri Aug 23 15:38:56 IST 2013,
 metageneration=1,
 stored-content-length=85515,
 generation=1377165478501000,
 Content-Type=plain/txt}

Case A: then I added Content-Encoding=utf8 and it also update successfully and showing in the metadata list.

But when I tried to remove this by removing the "Content-Encoding" metadata header from the metadata list which is going to update. It updated metadata successfully but its metadata details is showing the Content-Encoding header.

I observed that Google Storage support default metadata when I upload new copy of object in my bucket then I saw the stored-content-encoding=identity in its metadata list which I did not add with the new file.

Can anybody help me, how can I remove Content-Encoding once if I added it to the object.

Case B: If I add Content-Encoding with gzip value then it is not adding the Content-Encoding.

Ref : https://developers.google.com/storage/docs/reference-headers#contentencoding

Answers


Your question is not entirely clear (How do you upload or set metadata to begin with? You say it updates successfully but still fails?), but I'll try to answer it.

Case A: There is indeed a bug that inhibited removing the Content-Encoding metadata entry, which might be what you're seeing. It is being worked on, I'll update here when it is resolved. Edit: This has now been fixed.

Case B: Note that the transmitted content encoding for a specific request is actually negotiated for every request (and is subject to change by proxy servers along the route, for instance). In particular, the stored gzip encoding of an object can be removed by the server (i.e., it decompresses the object) if the client request didn't include the Accept-Encoding: gzip header. The x-goog-stored-content-encoding header indicates the content encoding as it is stored in Google Cloud Storage. I assume that still reports gzip in this case.


In my case, I was trying to add Content-Encoding: gzip to PNG/JPG images, when the aforementioned Case B was reproduced.

I guess that Google Cloud Storage was smart enough to don't let images be decompressed on client side, hence the lack of Content-Encoding: gzip and presence of x-goog-stored-content-encoding: gzip.

Actually, images aren't intended to be gzipped (1, 2, 3) - but actually optimized themselves (1, 2).


Need Your Help

content: "" is working if is added in html style tag, but not in css file

css css3 twitter

Source : http://twitter.github.com/bootstrap/components.html#navbar

Which Nuget Packages for use with Azure Offline Data Sync

c# sqlite azure

I was following the demo for Azure Offline Data Sync (https://azure.microsoft.com/en-us/documentation/articles/mobile-services-windows-store-dotnet-get-started-offline-data/). When adding the refer...