mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Fix out-of-range issue with iter_lines (#515).
This commit is contained in:
+1
-1
@@ -751,7 +751,7 @@ class Response(object):
|
||||
chunk = pending + chunk
|
||||
lines = chunk.splitlines()
|
||||
|
||||
if lines[-1][-1] == chunk[-1]:
|
||||
if lines and lines[-1] and chunk and lines[-1][-1] == chunk[-1]:
|
||||
pending = lines.pop()
|
||||
else:
|
||||
pending = None
|
||||
|
||||
Reference in New Issue
Block a user