supporting httpretty requests
This commit is contained in:
parent
ea66a71765
commit
390fe85137
1 changed files with 5 additions and 1 deletions
|
|
@ -547,8 +547,12 @@ class ResponseObject(_TemplateEnvironmentMixin):
|
|||
# ACL and checking for the mere presence of an Authorization
|
||||
# header.
|
||||
if 'Authorization' not in request.headers:
|
||||
if hasattr(request, 'url'):
|
||||
signed_url = 'Signature=' in request.url
|
||||
elif hasattr(request, 'requestline'):
|
||||
signed_url = 'Signature=' in request.path
|
||||
key = self.backend.get_key(bucket_name, key_name)
|
||||
signed_url = 'Signature=' in request.url
|
||||
|
||||
if key:
|
||||
if not key.acl.public_read and not signed_url:
|
||||
return 403, {}, ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue