Bugs item #1229646, was opened at 2005-06-29 07:39 Message generated for change (Comment added) made by gward You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1229646&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Chris Johns (cjohns) >Assigned to: Greg Ward (gward) Summary: httplib error checking. Initial Comment: The httplib does not seem to handle error codes cleanly or in a portable way. The socket could return a ECONNRESET and does on the RTEMS platform. Also value 32 is normally EPIPE, but ECONNRESET is different so the Python errno should be used. [please excuse the manual diff :-)] line 657: < if v[0] == 32: # Broken pipe line 657: > if v[0] == errno.EPIPE or v[0] == errno.ECONNRESET: line 803: > if v[0] != 32 or not self.auto_open: line 803: > if (v[0] != errno.EPIPE and v[0] != errno.ECONNRESET) or not self.auto_open: I can provide a patch if this change make sense. ---------------------------------------------------------------------- >Comment By: Greg Ward (gward) Date: 2006-07-24 17:04 Message: Logged In: YES user_id=14422 Yes, this bug report absolutely makes sense. httplib.py hardcodes errno values, e.g. it uses 32 when it should use errno.EPIPE. Bogus. IMHO this can and should be fixed. Adding checks for ECONNRESET at the same time as checking for EPIPE seems OK to me, but I'm not really sure. I'll try to whip up a patch. ---------------------------------------------------------------------- Comment By: Georg Brandl (birkenfeld) Date: 2005-07-02 06:50 Message: Logged In: YES user_id=1188172 Can someone judge if this makes sense? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1229646&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com