This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: xmlrpclib leaves connection in broken state if server returns error without content-length
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: fancycode, flox, loewis
Priority: normal Keywords:

Created on 2012-03-26 16:14 by fancycode, last changed 2022-04-11 14:57 by admin.

Messages (4)
msg156828 - (view) Author: Joachim Bauch (fancycode) Date: 2012-03-26 16:14
If a XML-RPC server returns an error page without a content-length header (for example with "transfer-encoding: chunked" instead), the method "single_request" in xmlrpclib doesn't read the response before raising a ProtocolError.
If this happens and the http connection is reused, the response is in a broken state and the next request will trigger a ResponseNotReady exception in httplib.

Possible solutions would be to explicitly close the response before raising the ProtocolError or read the response for chunked encoding.
msg223103 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-15 12:41
@Joachim I'm sorry about the delay in replying to you.  Can someone take a look at this please as it's out of my league.
msg223420 - (view) Author: Joachim Bauch (fancycode) Date: 2014-07-18 15:59
I could look into providing a patch if that helps...
msg223422 - (view) Author: Demian Brecht (demian.brecht) * (Python triager) Date: 2014-07-18 17:01
Of /course/ a patch always helps :)
History
Date User Action Args
2022-04-11 14:57:28adminsetgithub: 58622
2019-03-15 23:04:53BreamoreBoysetnosy: - BreamoreBoy
2015-02-13 01:25:02demian.brechtsetnosy: - demian.brecht
2014-07-18 17:01:14demian.brechtsetmessages: + msg223422
2014-07-18 15:59:08fancycodesetmessages: + msg223420
2014-07-18 15:18:15demian.brechtsetnosy: + demian.brecht
2014-07-15 12:41:42BreamoreBoysetnosy: + BreamoreBoy
messages: + msg223103
2012-09-25 13:00:20pitrousetnosy: + loewis, flox
2012-03-26 16:14:24fancycodecreate