def http_error_302(self, req, fp, code, msg, headers): """ Wraps the :func:`urllib2.HTTPRedirectHandler.http_error_302` handler, setting the ``result.status`` to ``302`` in case a http ``302`` error is encountered. """ result = HTTPRedirectHandler.http_error_302(self, req, fp, code, msg, headers) result.status = code return result
def http_error_302(self, req, fp, code, msg, headers): """ Wraps the :func:`urllib2.HTTPRedirectHandler.http_error_302` handler, setting the ``result.status`` to ``302`` in case a http ``302`` error is encountered. """ result = HTTPRedirectHandler.http_error_302( self, req, fp, code, msg, headers) result.status = code return result
def http_error_302(self, req, fp, code, msg, headers): # return reference result = None result = HTTPRedirectHandler.http_error_302( self, req, fp, code, msg, headers ) # log redirect info. self.log_redirect_info( result, code ) return result
def http_error_302(self, req, fp, code, msg, headers): # Jenkins can send several Set-Cookie values sometimes # The valid one is the last one for header, value in headers.items(): if header.lower() == 'set-cookie': cookie = self.extract_cookie(value) req.headers['Cookie'] = cookie result = HTTPRedirectHandler.http_error_302( self, req, fp, code, msg, headers) result.orig_status = code result.orig_headers = headers result.cookie = cookie return result
def http_error_302(self, req, fp, code, msg, headers): # Jenkins can send several Set-Cookie values sometimes # The valid one is the last one for header, value in headers.items(): if header.lower() == 'set-cookie': cookie = self.extract_cookie(value) req.headers['Cookie'] = cookie result = HTTPRedirectHandler.http_error_302(self, req, fp, code, msg, headers) result.orig_status = code result.orig_headers = headers result.cookie = cookie return result