Removed obsolete patches.

This commit is contained in:
Thomas Goirand 2015-06-10 09:37:31 +02:00
parent ba1ba4c8f9
commit fef5960952
4 changed files with 2 additions and 107 deletions

2
debian/changelog vendored
View File

@ -2,6 +2,8 @@ swift-plugin-s3 (1.8-1) unstable; urgency=medium
* New upstream release.
* Reviewed (build-)depends for this release.
* Fixed unit tests running.
* Removed obsolete patches.
-- Thomas Goirand <zigo@debian.org> Wed, 10 Jun 2015 09:28:51 +0200

View File

@ -1,59 +0,0 @@
From 47148674264dd4b07ff396f3481bbba203937491 Mon Sep 17 00:00:00 2001
From: Chuck Thier <cthier@gmail.com>
Date: Thu, 6 Dec 2012 11:06:08 -0600
Subject: [PATCH] Updated HEAD and ACL calls to objects to work correctly
---
swift3/middleware.py | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/swift3/middleware.py b/swift3/middleware.py
index bf52679..192a882 100644
--- a/swift3/middleware.py
+++ b/swift3/middleware.py
@@ -41,7 +41,8 @@
An example client using the python boto library might look like the
following for an SAIO setup::
- connection = boto.s3.Connection(
+ from boto.s3.connection import S3Connection
+ connection = S3Connection(
aws_access_key_id='test:tester',
aws_secret_access_key='testing',
port=8080,
@@ -603,25 +604,22 @@ def __init__(self, env, app, account_name, token, container_name,
object_name)
def GETorHEAD(self, env, start_response):
- if env['REQUEST_METHOD'] == 'HEAD':
- head = True
- env['REQUEST_METHOD'] = 'GET'
+ if 'QUERY_STRING' in env:
+ args = dict(urlparse.parse_qsl(env['QUERY_STRING'], 1))
else:
- head = False
+ args = {}
+ if 'acl' in args:
+ # ACL requests need to make a HEAD call rather than GET
+ env['REQUEST_METHOD'] = 'HEAD'
app_iter = self._app_call(env)
-
- if head:
+ if env['REQUEST_METHOD'] == 'HEAD':
app_iter = None
status = self._get_status_int()
headers = dict(self._response_headers)
if is_success(status):
- if 'QUERY_STRING' in env:
- args = dict(urlparse.parse_qsl(env['QUERY_STRING'], 1))
- else:
- args = {}
if 'acl' in args:
return get_acl(self.account_name, headers)
--
1.8.5.1

View File

@ -1,46 +0,0 @@
From b8b5998e0a9fad4e63dc8db2085e8bfbc387dec4 Mon Sep 17 00:00:00 2001
From: Kota Tsuyuzaki <tsuyuzaki.kota@lab.ntt.co.jp>
Date: Tue, 26 Feb 2013 20:57:32 -0800
Subject: [PATCH] fix signature bug to use RAW_PATH_INFO
This fixes signature creation to use RAW_PATH_INFO.
Swift3 could not create correct signature in case of
using escaped character(e.g. %2F, %2D) in PATH_INFO,
because env['PATH_INFO'] was decoded(unescaped) by
eventlet.wsgi before a request arrived at swift3.
It caused signature mismatch and authentication failure.
This change enables swift3 to create signature from
RAW_PATH_INFO and fixes that bug.
Note: This patch works well only in later version than
eventlet 0.9.17, because older version does not
have RAW_PATH_INFO variable.
When using older version, swift3 works in the same
way as ever(use req.path of swob).
Signed-off-by: Kota Tsuyuzaki <tsuyuzaki.kota@lab.ntt.co.jp>
---
swift3/middleware.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/swift3/middleware.py b/swift3/middleware.py
index 87159b3..b009b09 100644
--- a/swift3/middleware.py
+++ b/swift3/middleware.py
@@ -266,7 +266,10 @@ def canonical_string(req):
for k in sorted(key.lower() for key in amz_headers):
buf += "%s:%s\n" % (k, amz_headers[k])
- path = req.path
+ # RAW_PATH_INFO is enabled in later version than eventlet 0.9.17.
+ # When using older version, swift3 uses req.path of swob instead
+ # of it.
+ path = req.environ.get('RAW_PATH_INFO', req.path)
if req.query_string:
path += '?' + req.query_string
if '?' in path:
--
1.8.5.1

View File

@ -1,2 +0,0 @@
fix_signature_bug_to_use_RAW_PATH_INFO.patch
Updated_HEAD_and_ACL_calls_to_objects_to_work_correctly.patch