Created
October 31, 2014 04:16
-
-
Save tseaver/107797eaeaff70183d37 to your computer and use it in GitHub Desktop.
Borked ACL APIs on tseaver:151-163-use_acl_endpoints branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> pp(key.metadata) | |
{u'bucket': u'tseaver-acl_test', | |
u'contentType': u'text/plain', | |
u'crc32c': u'gxU05g==', | |
u'etag': u'CNCAufqB1sECEAE=', | |
u'generation': u'1414728392786000', | |
u'id': u'tseaver-acl_test/test_file.txt/1414728392786000', | |
u'kind': u'storage#object', | |
u'md5Hash': u'JzS0T3kN66gC8V8yS/mI3Q==', | |
u'mediaLink': u'https://www.googleapis.com/download/storage/v1/b/tseaver-acl_test/o/test_file.txt?generation=1414728392786000&alt=media', | |
u'metageneration': u'1', | |
u'name': u'test_file.txt', | |
u'owner': {u'entity': u'user-00b4903a9728270765eb8fae2f46bf591a7f494c220ca4ef327c94dfa4dbf51b', | |
u'entityId': u'00b4903a9728270765eb8fae2f46bf591a7f494c220ca4ef327c94dfa4dbf51b'}, | |
u'selfLink': u'https://www.googleapis.com/storage/v1/b/tseaver-acl_test/o/test_file.txt', | |
u'size': u'4', | |
u'storageClass': u'STANDARD', | |
u'updated': u'2014-10-31T04:06:32.785Z'} | |
>>> key.clear_acl() | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "gcloud/storage/key.py", line 437, in clear_acl | |
method='PATCH', path=self.path, data={'acl': []}) | |
File "gcloud/storage/connection.py", line 235, in api_request | |
raise exceptions.NotFoundError(response) | |
gcloud.storage.exceptions.NotFoundError | |
>>> key.set_contents_from_string('Boo!') | |
<Key: tseaver-acl_test, test_file.txt> | |
>>> key.clear_acl() | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "gcloud/storage/key.py", line 437, in clear_acl | |
method='PATCH', path=self.path, data={'acl': []}) | |
File "gcloud/storage/connection.py", line 237, in api_request | |
raise exceptions.ConnectionError(response, content) | |
gcloud.storage.exceptions.ConnectionError: {'status': '400', 'alternate-protocol': '443:quic,p=0.01', 'content-length': '180', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'expires': 'Fri, 31 Oct 2014 04:06:35 GMT', 'vary': 'Origin, Referer, X-Origin', 'server': 'GSE', '-content-encoding': 'gzip', 'cache-control': 'private, max-age=0', 'date': 'Fri, 31 Oct 2014 04:06:35 GMT', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json; charset=UTF-8'}{ | |
"error": { | |
"errors": [ | |
{ | |
"domain": "global", | |
"reason": "invalid", | |
"message": "Invalid argument." | |
} | |
], | |
"code": 400, | |
"message": "Invalid argument." | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment