diff options
Diffstat (limited to 'swift/common/middleware/s3api/s3request.py')
-rw-r--r-- | swift/common/middleware/s3api/s3request.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/swift/common/middleware/s3api/s3request.py b/swift/common/middleware/s3api/s3request.py index fa39a68d8..28e734f0b 100644 --- a/swift/common/middleware/s3api/s3request.py +++ b/swift/common/middleware/s3api/s3request.py @@ -1332,6 +1332,12 @@ class S3Request(swob.Request): # reuse account _, self.account, _ = split_path(sw_resp.environ['PATH_INFO'], 2, 3, True) + # Propagate swift.backend_path in environ for middleware + # in pipeline that need Swift PATH_INFO like ceilometermiddleware. + # Store PATH_INFO only the first time to ignore multipart requests. + if 'swift.backend_path' not in self.environ: + self.environ['swift.backend_path'] = \ + sw_resp.environ['PATH_INFO'] resp = S3Response.from_swift_resp(sw_resp) status = resp.status_int # pylint: disable-msg=E1101 |