Bart Whiteley wrote: > On Wed, 2007-04-25 at 23:30 -0300, Sidnei da Silva wrote: > > Subclass HTTPConnection and implement your own send()? > > Yes. That seemed to be the best (or only) solution. I believe anyone > using HTTPConnection for a POST where authentication may be required > will have to do the same thing.
Sounds like an excellent candidate for a ticket and patch to Python. Since socket error numbers are platform-specific, CherryPy's HTTP server does this: import errno socket_errors_to_ignore = [] # Not all of these names will be defined for every platform. for _ in ("EPIPE", "ETIMEDOUT", "ECONNREFUSED", "ECONNRESET", "EHOSTDOWN", "EHOSTUNREACH", "WSAECONNABORTED", "WSAECONNREFUSED", "WSAECONNRESET", "WSAENETRESET", "WSAETIMEDOUT"): if _ in dir(errno): socket_errors_to_ignore.append(getattr(errno, _)) # de-dupe the list socket_errors_to_ignore = dict.fromkeys(socket_errors_to_ignore).keys() socket_errors_to_ignore.append("timed out") ...the stdlib might benefit from a similar (overridable) list. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com