Skip to content
Myr

Merge remote-tracking branch 'origin/master'

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 · parents ab19b79, c63472e · Browse files · 1 file+8 added−7 removed
This commit

State

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

Diff stats

1 file+8 added−7 removed

  • other:+8 added−7 removed

1 file+8 added−7 removed

modified:requests/models.py+8 added-7 removed
509 unmodified lines
510 (Thanks, Ian!)."""511 return chardet.detect(self.content)['encoding']512513 def iter_content(self, chunk_size=1, decode_unicode=False):514 """Iterates over the response data. This avoids reading the content515 at once into memory for large responses. The chunk size is the number516 of bytes it should read into memory. This is not necessarily the517 length of each item returned as decoding can take place.514 """Iterates over the response data. When stream=True is set on the515 request, this avoids reading the content at once into memory for516 large responses. The chunk size is the number of bytes it should517 read into memory. This is not necessarily the length of each item518 returned as decoding can take place.519 """520 if self._content_consumed:521 # simulate reading small chunks of the content522 return iter_slices(self._content, chunk_size)
13 unmodified lines
536537 return gen538539 def iter_lines(self, chunk_size=ITER_CHUNK_SIZE, decode_unicode=None):539 """Iterates over the response data, one line at a time. This540 avoids reading the content at once into memory for large541 responses.540 """Iterates over the response data, one line at a time. When541 stream=True is set on the request, this avoids reading the542 content at once into memory for large responses.543 """544545 pending = None546
125 unmodified lines