Fix auth for anonymous S3 requests

https://github.com/boto/boto/issues/1988
f38
Garrett Holmstrom 11 years ago
parent 88edf3ea33
commit 24bffb1d10

@ -0,0 +1,15 @@
Index: boto/boto/connection.py
===================================================================
--- boto.orig/boto/connection.py
+++ boto/boto/connection.py
@@ -891,8 +891,8 @@ class AWSAuthConnection(object):
# the port info. All others should be now be up to date and
# not include the port.
if 's3' not in self._required_auth_capability():
- self.set_host_header(request)
-
+ if not getattr(self, 'anon', False):
+ self.set_host_header(request)
if callable(sender):
response = sender(connection, request.method, request.path,
request.body, request.headers)

@ -14,6 +14,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Fix auto-scaling get_all_adjustment_types
# https://github.com/boto/boto/pull/1538
Patch2: boto-2.9.9-adjtype.patch
# Fix auth for anonymous S3 requests
# https://github.com/boto/boto/issues/1988
Patch3: boto-2.23.0-s3-anon.patch
%description
@ -26,6 +29,7 @@ use, lightweight wrapper around the Amazon services.
%prep
%setup -q -n boto-%{version}
%patch2 -p1
%patch3 -p1
rm -r boto.egg-info
@ -63,6 +67,7 @@ rm -r boto.egg-info
%changelog
* Mon Jan 20 2014 Garrett Holmstrom <gholms@fedoraproject.org> - 2.23.0-1
- Updated to 2.23.0
- Fixed auth for anonymous S3 requests (boto #1988)
* Thu Sep 26 2013 Garrett Holmstrom <gholms@fedoraproject.org> - 2.13.3-1
- Updated to 2.13.3

Loading…
Cancel
Save