[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

Martin Panter report at bugs.python.org
Sun Feb 22 11:56:31 CET 2015


Martin Panter added the comment:

Posting RemoteDisconnected.v5.patch:

* Rebased and fixed minor merge conflict
* Change RemoteDisconnected base class from ConnectionError to ConnectionResetError
* Minor tweaks to tests

It seems that having a separate RemoteDisconnected exception (as in this patch) has at least two benefits:

1. It would allow the user to distinguish between a true ConnectionResetError (due to TCP reset or whatever) from a clean TCP shutdown

2. Backwards compatibility with user code that only handles BadStatusLine

The only disadvantage seems to be the bloat of adding a new exception type. But if some other comitter agrees that merging them is better and dropping backwards compatibility is okay I am happy to adjust the patch to go along with that.

----------
Added file: http://bugs.python.org/file38203/RemoteDisconnected.v5.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3566>
_______________________________________


More information about the Python-bugs-list mailing list