Patch: httplib.py default timeout

Aahz Maruch aahz at netcom.com
Thu Dec 23 15:07:43 EST 1999


In article <14434.30162.38117.637290 at weyr.cnri.reston.va.us>,
Fred L. Drake, Jr. <fdrake at acm.org> wrote:
>Aahz Maruch writes:
>>
>> kind of problem.  Since httplib is the one that's biting me now (and is
>> likely to be the most common one for casual users IMO), that's the one
>
>  Why would httplib be the common case?  I'd think most casual users
>would normally want urllib, especially since it also handles proxy
>support.

Yes, exactly.  I think you missed my original post, so I'll repeat
myself differently:

There is currently no timeout support in httplib.  In order for urllib
to handle timeouts in the current configuration, it would have to
directly manipulate the socket object inside HTTP() -- that's a Bad
Idea, IMO.  Given that we have to patch httplib to add timeout support,
I think the correct approach is to make timeouts the default and not
even expose the timeout interface to users of urllib (we also don't have
to patch urllib that way).  Anyone who currently manipulates the HTTP()
socket to deal with timeouts will not be affected.

And I think you'd agree that httplib is the most common case for urllib.

Is that clearer?
--
                      --- Aahz (@netcom.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

Eighth Virtual Anniversary -- 8 days and counting!



More information about the Python-list mailing list