Created
December 12, 2017 21:21
-
-
Save clayg/95cc8f0ecdbec1ee2c85afa0f134507a to your computer and use it in GitHub Desktop.
fix PUT w/ X-Copy-From for symlink=get
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
diff --git a/swift/common/middleware/copy.py b/swift/common/middleware/copy.py | |
index b66ab9d..26a1649 100644 | |
--- a/swift/common/middleware/copy.py | |
+++ b/swift/common/middleware/copy.py | |
@@ -327,10 +327,10 @@ class ServerSideCopyMiddleware(object): | |
source_req.headers['X-Newest'] = 'true' | |
# in case we are copying an SLO manifest, set format=raw parameter | |
- params = source_req.params | |
- if params.get('multipart-manifest') == 'get': | |
- params['format'] = 'raw' | |
- source_req.params = params | |
+ if req.params.get('multipart-manifest') == 'get': | |
+ source_req.params['format'] = 'raw' | |
+ if req.params.get('symlink') == 'get': | |
+ source_req.params['symlink'] = 'get' | |
source_resp = ssc_ctx.get_source_resp(source_req) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment