[EMAIL PROTECTED] writes:
> In a message dated 12/6/01 9:33:05 AM Pacific Standard Time,
> [EMAIL PROTECTED] writes:
> > Do you have some URL that I can try that fails? It
> > might be hard to reproduce if it depends on timing and perhaps the
> > client OS. Please also report what version of LWP, Perl you use and
> > what OS you are running on.
> Thanks for the fast response! First things first: I'm using Solaris 5.7 and
> libwww 5.62 and perl 5.6.0.
> > One thing that is different in the new driver code is that the socket
> > is put into non-blocking mode.
> Aha! That must be it. I commented out the blocking(0) call
> LWP::Protocol::http and it started working again -- even without my band-aid
> retry loop for the sysread.
> So for some strange reason, under specific circumstances, the select() call
> seems to indicate there's something on the socket when there isn't anything
I've been staring at the code some more. We will skip the select() if
you set timeout to 0. Have you done that? I think that must be
considered a bug anyway.
The reason for putting the socket in non-blocking mode is that we
don't want to block while writing. The reason for that again is that
we need to monitor the connection for error responses while we write
the request content and abort if we receive an error indication.
Perhaps it is a good idea to not put the socket in non-blocking mode
until we enter that write loop.
> The problem is indeed very hard to reproduce. I've seen it on
> http://my.screenname.aol.com. The page there will redirect you to www.aol.com
> but that's irrelevant to the problem. The difficulty I have reproducing it is
> that it also depends on the client side code somehow. If I use a simple
> LWP::UserAgent, it works fine. However, if I use my XML-driven test suite
> which uses LWP::UserAgent internally, it fails. I'll try to get you a valid
> test case today with very little overhead. BTW, just checked, the problem
> shows on SSL, too -- is there a way to turn it's blocking off also?
SSL is different. Non-blocking mode has been disabled for SSL. Look