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 @@ -311,6 +311,12 @@ HTTPConnection Objects
311311 :class: `str ` or bytes-like object that is not also a file as the
312312 body representation.
313313
314+ .. note ::
315+
316+ Note that you must have read the whole response or call :meth: `close `
317+ if :meth: `getresponse ` raised an non-:exc: `ConnectionError ` exception
318+ before you can send a new request to the server.
319+
314320 .. versionchanged :: 3.2
315321 *body * can now be an iterable.
316322
@@ -326,16 +332,15 @@ HTTPConnection Objects
326332 Should be called after a request is sent to get the response from the server.
327333 Returns an :class: `HTTPResponse ` instance.
328334
329- .. note ::
330-
331- Note that you must have read the whole response before you can send a new
332- request to the server.
333-
334335 .. versionchanged :: 3.5
335336 If a :exc: `ConnectionError ` or subclass is raised, the
336337 :class: `HTTPConnection ` object will be ready to reconnect when
337338 a new request is sent.
338339
340+ Note that this does not apply to :exc: `OSError `\s raised by the underlying
341+ socket. Instead the caller is responsible to call :meth: `close ` on the
342+ existing connection.
343+
339344
340345.. method :: HTTPConnection.set_debuglevel(level)
341346
You can’t perform that action at this time.
0 commit comments