Skip to content
Myr

who wrote this shit

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent f41560c · Browse files · 2 files+5 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+5 added−4 removed

  • other:+5 added−4 removed

2 files+5 added−4 removed

modified:requests/models.py+4 added-2 removed
709 unmodified lines
710 return ('location' in self.headers and self.status_code in REDIRECT_STATI)711712 @property713 def is_permanent_redirect(self):714 """True if this Response one of the permanent versions of redirect"""714 """True if this Response one of the permanent versions of redirect."""715 return ('location' in self.headers and self.status_code in (codes.moved_permanently, codes.permanent_redirect))716717 def next(self):718 """Returns a PreparedRequest for the next request in a redirect chain, if there is one."""719 if self.is_redirect:720 return self._next721722 @property723 def apparent_encoding(self):722 """The apparent encoding, provided by the chardet library"""724 """The apparent encoding, provided by the chardet library."""725 return chardet.detect(self.content)['encoding']726727 def iter_content(self, chunk_size=1, decode_unicode=False):728 """Iterates over the response data. When stream=True is set on the
223 unmodified lines
modified:requests/sessions.py+1 added-2 removed
599 unmodified lines
600601 return self.request('DELETE', url, **kwargs)602603 def send(self, request, **kwargs):604 """605 Send a given PreparedRequest.604 """Send a given PreparedRequest.605606 :rtype: requests.Response607 """608 # Set defaults that the hooks can utilize to ensure they always have
159 unmodified lines