File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -319,6 +319,12 @@ HTTPConnection Objects
319319 :class: `str ` or bytes-like object that is not also a file as the
320320 body representation.
321321
322+ .. note ::
323+
324+ Note that you must have read the whole response or call :meth: `close `
325+ if :meth: `getresponse ` raised an non-:exc: `ConnectionError ` exception
326+ before you can send a new request to the server.
327+
322328 .. versionchanged :: 3.2
323329 *body * can now be an iterable.
324330
@@ -334,16 +340,15 @@ HTTPConnection Objects
334340 Should be called after a request is sent to get the response from the server.
335341 Returns an :class: `HTTPResponse ` instance.
336342
337- .. note ::
338-
339- Note that you must have read the whole response before you can send a new
340- request to the server.
341-
342343 .. versionchanged :: 3.5
343344 If a :exc: `ConnectionError ` or subclass is raised, the
344345 :class: `HTTPConnection ` object will be ready to reconnect when
345346 a new request is sent.
346347
348+ Note that this does not apply to :exc: `OSError `\s raised by the underlying
349+ socket. Instead the caller is responsible to call :meth: `close ` on the
350+ existing connection.
351+
347352
348353.. method :: HTTPConnection.set_debuglevel(level)
349354
You can’t perform that action at this time.
0 commit comments