diff --git a/swift/common/wsgi.py b/swift/common/wsgi.py index 3a75e7197f..e7504355b6 100644 --- a/swift/common/wsgi.py +++ b/swift/common/wsgi.py @@ -1084,8 +1084,8 @@ def make_env(env, method=None, path=None, agent='Swift', query_string=None, :returns: Fresh WSGI environment. """ newenv = {} - for name in ('eventlet.posthooks', 'HTTP_USER_AGENT', 'HTTP_HOST', - 'PATH_INFO', 'QUERY_STRING', 'REMOTE_USER', 'REQUEST_METHOD', + for name in ('HTTP_USER_AGENT', 'HTTP_HOST', 'PATH_INFO', + 'QUERY_STRING', 'REMOTE_USER', 'REQUEST_METHOD', 'SCRIPT_NAME', 'SERVER_NAME', 'SERVER_PORT', 'HTTP_ORIGIN', 'HTTP_ACCESS_CONTROL_REQUEST_METHOD', 'SERVER_PROTOCOL', 'swift.cache', 'swift.source', diff --git a/swift/proxy/controllers/obj.py b/swift/proxy/controllers/obj.py index 8e1b9fbf0c..3df9648c6a 100644 --- a/swift/proxy/controllers/obj.py +++ b/swift/proxy/controllers/obj.py @@ -818,6 +818,13 @@ class BaseObjectController(Controller): self.object_name = dest_object # re-write the existing request as a PUT instead of creating a new one # since this one is already attached to the posthooklogger + # TODO: Swift now has proxy-logging middleware instead of + # posthooklogger used in before. i.e. we don't have to + # keep the code depends on evnetlet.posthooks sequence, IMHO. + # However, creating a new sub request might + # cause the possibility to hide some bugs behindes the request + # so that we should discuss whichi is suitable (new-sub-request + # vs re-write-existing-request) for Swift. [kota_] req.method = 'PUT' req.path_info = '/v1/%s/%s/%s' % \ (dest_account, dest_container, dest_object)