diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2009-02-11 00:39:14 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2009-02-11 00:39:14 (GMT) |
commit | b353c12a9caa20e90466af6a8f17a227b72e4f23 (patch) | |
tree | 324c9dde570196bd47044f262e7387aef652919a /Lib/urllib/response.py | |
parent | 651453ace09e6677d8fea66d3cbbf8614b109f16 (diff) | |
download | cpython-b353c12a9caa20e90466af6a8f17a227b72e4f23.zip cpython-b353c12a9caa20e90466af6a8f17a227b72e4f23.tar.gz cpython-b353c12a9caa20e90466af6a8f17a227b72e4f23.tar.bz2 |
Issue #4631: Fix urlopen() result when an HTTP response uses chunked encoding.
Diffstat (limited to 'Lib/urllib/response.py')
-rw-r--r-- | Lib/urllib/response.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/urllib/response.py b/Lib/urllib/response.py index 1352622..52eeed0 100644 --- a/Lib/urllib/response.py +++ b/Lib/urllib/response.py @@ -17,7 +17,8 @@ class addbase(object): self.read = self.fp.read self.readline = self.fp.readline # TODO(jhylton): Make sure an object with readlines() is also iterable - if hasattr(self.fp, "readlines"): self.readlines = self.fp.readlines + if hasattr(self.fp, "readlines"): + self.readlines = self.fp.readlines if hasattr(self.fp, "fileno"): self.fileno = self.fp.fileno else: |