peterknife / boto

Automatically exported from code.google.com/p/boto
0 stars 0 forks source link

Setting acl during put ? #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Again, just trying to save one round trip so instead of put then set_acl, 
I am wondering if I can have metadata['acl'] which goto populated at one 
go.

Original issue reported on code.google.com by bon...@gmail.com on 5 Feb 2007 at 7:53

GoogleCodeExporter commented 9 years ago
This would work for the canned ACL policies and I think it makes sense to 
support that.

Original comment by Mitch.Ga...@gmail.com on 26 Feb 2007 at 1:40

GoogleCodeExporter commented 9 years ago
bucket.new_key() could have an acl parameter as well.

Original comment by anse...@gmail.com on 27 Mar 2007 at 3:32

GoogleCodeExporter commented 9 years ago
Actually, this doesn't work.  If you try to specify the "acl" query arg while 
PUT'ing
a key you get this:

<class 'boto.exception.S3ResponseError'>: S3ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>UnexpectedContent</Code><Message>This request does not support
content</Message><RequestId>F659B15A28B46F12</RequestId><HostId>oSqZ/n3ioffJZmfs
uxjUJ5T+Pga2+wG5lFh4JATPbR2+wEyfP6isjC396QmAD7CU</HostId></Error>

To bad, it would save a roundtrip.

Original comment by Mitch.Ga...@gmail.com on 26 Apr 2008 at 12:03

GoogleCodeExporter commented 9 years ago

Original comment by Mitch.Ga...@gmail.com on 26 Apr 2008 at 12:10

GoogleCodeExporter commented 9 years ago
Actually, this does work.  I'm just an idiot.

If you just include the x-amz-acl header in the request it works like a charm.  
My
problem was I was also trying to put the "?acl" query parameter on the request, 
too,
and it doesn't like that.

Fixed in http://code.google.com/p/boto/source/detail?r=715.

Original comment by Mitch.Ga...@gmail.com on 4 May 2008 at 1:22