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.

Author skip.montanaro
Recipients
Date 2003-03-20.18:43:37
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=44345

Sorry for the delay on this.  I think I'm closing in on the
problem.  I've been using Tim O'Malley's timeoutsocket
module for quite awhile.  I noticed the same problem today
when using the new timeout feature in the socket module.
Libraries like xmlrpclib use makefile() to get a file object
to play with.  File objects don't play well with timeouts
because the socket is in non-blocking mode.  I think what
happens here is that the first line of HTTPResponse.
_read_status sets line to the empty string because of the
timeout setting.  Tracing through the code which follows
makes it clear that control will wind up in the HTTP/0.9
chunk of code.

Maybe it's worth adding a test for line == "" after the
readline() call:

        line = self.fp.readline()
        if self.debuglevel > 0:
            print "reply:", repr(line)
        if line == "":
            raise BadStatusLine(line)

That would distinguish an error reading from an 0.9 server
(which would return something with that first readline()
call).
History
Date User Action Args
2007-08-23 14:09:58adminlinkissue666219 messages
2007-08-23 14:09:58admincreate