We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def _build_response(self, resp): """Build internal Response object from given response.""" def build(resp): ... history = [] r = build(resp) if self.redirect: while 'location' in r.headers: history.append(r) url = r.headers['location'] request = Request( url, self.headers, self.files, self.method, self.data, self.auth, self.cookiejar, redirect=False ) request.send() r = request.response r.history = history self.response = r
这段代码并没有用到递归. 注意在Request实例化的时候参数redirect=False, 这意味着这个新建的实例并不会执行这段代码, 不会递归地进行redirect.
这里的redirect仅仅是使用一个while循环来不断转发的.
The text was updated successfully, but these errors were encountered:
request.send() 里边 调用了 _build_response()自己
Sorry, something went wrong.
No branches or pull requests
这段代码并没有用到递归. 注意在Request实例化的时候参数redirect=False, 这意味着这个新建的实例并不会执行这段代码, 不会递归地进行redirect.
这里的redirect仅仅是使用一个while循环来不断转发的.
The text was updated successfully, but these errors were encountered: