Message236241
Posting RemoteDisconnected.v4.patch with these changes:
* Renamed ConnectionClosed → RemoteDisconnected. Hopefully avoids confusion with shutting down the local end of a connection, or closing a socket’s file descriptor.
* Dropped the HTTPConnection.closed attribute
* Dropped special distinction of ECONNRESET at start versus in middle of response. It certainly makes the code and tests simpler again, and I realize that distinction is not the most important problem to solve right now, if ever. Also avoids relying on the poorly defined BufferedReader.peek() method.
I would like to retain the backwards compatibility with BadStatusLine if that is okay though.
Requests and “urllib3”: I’m not overly familiar with the internals of these packages (Requests uses “urllib3”). I cannot find any reference to BadStatusLine handling in “urllib3”, and I suspect it might just rely on detecting a dropped connection before sending a request; see <https://github.com/shazow/urllib3/blob/c8e7ea5/urllib3/connectionpool.py#L236>. In my opinion this is a race condition, but it is helpful and works most of the time. So I suspect “urllib3” would not be affected by any changes made relating to BadStatusLine. |
|
Date |
User |
Action |
Args |
2015-02-19 23:27:29 | martin.panter | set | recipients:
+ martin.panter, jhylton, mhammond, jcea, orsenthil, amak, rbcollins, cananian, r.david.murray, alanjds, agriffis, icordasc, demian.brecht, Yuri.Bochkarev |
2015-02-19 23:27:28 | martin.panter | set | messageid: <1424388448.52.0.238896285549.issue3566@psf.upfronthosting.co.za> |
2015-02-19 23:27:28 | martin.panter | link | issue3566 messages |
2015-02-19 23:27:28 | martin.panter | create | |
|