Merge "eventlet.posthook related code needn't anymore"
This commit is contained in:
		@@ -1084,8 +1084,8 @@ def make_env(env, method=None, path=None, agent='Swift', query_string=None,
 | 
				
			|||||||
    :returns: Fresh WSGI environment.
 | 
					    :returns: Fresh WSGI environment.
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    newenv = {}
 | 
					    newenv = {}
 | 
				
			||||||
    for name in ('eventlet.posthooks', 'HTTP_USER_AGENT', 'HTTP_HOST',
 | 
					    for name in ('HTTP_USER_AGENT', 'HTTP_HOST', 'PATH_INFO',
 | 
				
			||||||
                 'PATH_INFO', 'QUERY_STRING', 'REMOTE_USER', 'REQUEST_METHOD',
 | 
					                 'QUERY_STRING', 'REMOTE_USER', 'REQUEST_METHOD',
 | 
				
			||||||
                 'SCRIPT_NAME', 'SERVER_NAME', 'SERVER_PORT',
 | 
					                 'SCRIPT_NAME', 'SERVER_NAME', 'SERVER_PORT',
 | 
				
			||||||
                 'HTTP_ORIGIN', 'HTTP_ACCESS_CONTROL_REQUEST_METHOD',
 | 
					                 'HTTP_ORIGIN', 'HTTP_ACCESS_CONTROL_REQUEST_METHOD',
 | 
				
			||||||
                 'SERVER_PROTOCOL', 'swift.cache', 'swift.source',
 | 
					                 'SERVER_PROTOCOL', 'swift.cache', 'swift.source',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -818,6 +818,13 @@ class BaseObjectController(Controller):
 | 
				
			|||||||
        self.object_name = dest_object
 | 
					        self.object_name = dest_object
 | 
				
			||||||
        # re-write the existing request as a PUT instead of creating a new one
 | 
					        # re-write the existing request as a PUT instead of creating a new one
 | 
				
			||||||
        # since this one is already attached to the posthooklogger
 | 
					        # 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.method = 'PUT'
 | 
				
			||||||
        req.path_info = '/v1/%s/%s/%s' % \
 | 
					        req.path_info = '/v1/%s/%s/%s' % \
 | 
				
			||||||
                        (dest_account, dest_container, dest_object)
 | 
					                        (dest_account, dest_container, dest_object)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user