Setting Default S3 Headers with Spaces in Values

402 views
Skip to first unread message

Jon Wu

unread,
Feb 6, 2012, 4:50:16 PM2/6/12
to cybe...@googlegroups.com
I'm trying to set Cache-Control and Expires default headers on Mac using the following:

defaults write ch.sudo.cyberduck s3.metadata.default "Cache-Control=public, max-age=31536000 Expires=Fri, 01 Feb 2013 00:00:00 GMT"

The problem is that this sets the following headers:

Cache-Control=public,
max-age=31536000
Expires=Fri

Instead of the expected:

Cache-Control=public, max-age=31536000
Expires=Fri, 01 Feb 2013 00:00:00 GMT

I can see why this happens, is there a way to property quote values with spaces in them?



Also, what's the best way to change a header for everything in a bucket - is that possible? The best thing I've seen is to select everything in a folder and then bringing up Info and trying to change the headers for multiple files but that doesn't seem to be applying the new headers to all of the files consistently.

Thanks for your help and hard work on this project!
Message has been deleted

David Kocher

unread,
Feb 17, 2012, 11:43:28 AM2/17/12
to cybe...@googlegroups.com
Jon,

We do not currently handle whitespace in metadata properly. We will fix this in an upcoming release that will allow escaping whitespace that is part of the metadata like Cache-Control=public,max-age=31536000 Expires=Fri,\ 01\ Feb\ 2013\ 00:00:00\ GMT

-
David

> --
> You received this message because you are subscribed to the Google Groups "Cyberduck" group. To post to this group, send email to cybe...@googlegroups.com
> To unsubscribe from this group, send email to cyberduck+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/cyberduck
> --
> Post bug reports and feature requests
> http://trac.cyberduck.ch/newticket
> --
> Support development
> http://cyberduck.ch/donate/

Jon Wu

unread,
Feb 17, 2012, 3:46:19 PM2/17/12
to cybe...@googlegroups.com
Great! Thank you David. Looking forward to this feature. Then I think we can replace Bucket Explorer.

A nice feature addition here would be the ability to store a shared configuration in the bucket. This way you could set your defaults in the cloud and all Cyber Duck users for that bucket or folder could apply the same defaults. Bucket Explorer does this by storing a bucketexplorerbucketdefaults_<bucket>.xml file in the root of the bucket and updating and reading settings for the bucket from there.

Thanks for your hard work!
Jon

On Fri, Feb 17, 2012 at 8:41 AM, David Kocher <dko...@cyberduck.ch> wrote:
Jon,

We do not currently handle whitespace in metadata properly. We should support escaping whitespace



Jon,


We will fix this in an upcoming release that will allow escaping whitespace that is part of the metadata like
Cache-Control=public,max-age=31536000 Expires=Fri,\ 01\ Feb\ 2013\ 00:00:00\ GMT

-
David

On 06.02.2012, at 22:50, Jon Wu wrote:

Reply all
Reply to author
Forward
0 new messages