mirror of
https://github.com/python/cpython.git
synced 2025-09-17 22:20:23 +00:00
Fix Issue1327971: HTTPResponse should expose a proper fileno attribute
This commit is contained in:
parent
a6166dac94
commit
d389cb5bcf
3 changed files with 21 additions and 0 deletions
|
@ -639,6 +639,9 @@ class HTTPResponse:
|
|||
amt -= len(chunk)
|
||||
return ''.join(s)
|
||||
|
||||
def fileno(self):
|
||||
return self.fp.fileno()
|
||||
|
||||
def getheader(self, name, default=None):
|
||||
if self.msg is None:
|
||||
raise ResponseNotReady()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue