mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
prefetch handling for _content_consumed
This commit is contained in:
@@ -423,6 +423,10 @@ class Request(object):
|
||||
r = dispatch_hook('post_request', self.hooks, self)
|
||||
self.__dict__.update(r.__dict__)
|
||||
|
||||
# If prefetch is True, mark content as consumed.
|
||||
if prefetch:
|
||||
self.response._content_consumed = True
|
||||
|
||||
return self.sent
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user