mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Change _begin() back to begin().
Client code could create responses explicitly.
This commit is contained in:
parent
dd523eef95
commit
39c03808c7
2 changed files with 5 additions and 6 deletions
|
@ -198,7 +198,6 @@ class HTTPMessage(mimetools.Message):
|
|||
else:
|
||||
self.status = self.status + '; bad seek'
|
||||
break
|
||||
|
||||
|
||||
class HTTPResponse:
|
||||
|
||||
|
@ -260,7 +259,7 @@ class HTTPResponse:
|
|||
raise BadStatusLine(line)
|
||||
return version, status, reason
|
||||
|
||||
def _begin(self):
|
||||
def begin(self):
|
||||
if self.msg is not None:
|
||||
# we've already started reading the response
|
||||
return
|
||||
|
@ -741,7 +740,7 @@ class HTTPConnection:
|
|||
else:
|
||||
response = self.response_class(self.sock, strict=self.strict)
|
||||
|
||||
response._begin()
|
||||
response.begin()
|
||||
assert response.will_close != _UNKNOWN
|
||||
self.__state = _CS_IDLE
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue