<URL: https://rt.cpan.org/Ticket/Display.html?id=43719 >
На 28 февр. 2009, сб 02:20:16, antonio написа: > Forwarding from http://bugs.debian.org/216821 > > --- > > When using the HTTP 1.1 protocol, LWP sets the socket nonblocking. > This means that connect(2) can fail with EINPROGRESS, and then LWP > should wait on the socket using select(2). However, LWP doesn't check > for EINPROGRESS; it instead just passes it back to the application > with code 500. > > It's not clear to me why LWP uses nonblocking sockets for HTTP 1.1, > but not for HTTP 1.0, HTTPS 1.1, or HTTPS 1.0. > > Here is a workaround: > > --- lib/LWP/Protocol/http.pm.orig 2002-09-20 14:53:30.000000000 +0000 > +++ lib/LWP/Protocol/http.pm 2003-10-21 03:54:06.000000000 +0000 > @@ -48,7 +48,7 @@ > } > > # perl 5.005's IO::Socket does not have the blocking method. > - eval { $sock->blocking(0); }; > + #eval { $sock->blocking(0); }; > > $sock; > } The attached patch is applied to the Debian package of libwww-perl. Cheers, dam
Description: drop $sock->blocking(0) call, requires handling of EINPROGRESS Author: Michael Shields <shie...@msrl.com> Reviewed-By: Damyan Ivanov <d...@debian.org> Bug-Debian: https://bugs.debian.org/216821 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=43719 --- a/lib/LWP/Protocol/http.pm +++ b/lib/LWP/Protocol/http.pm @@ -41,9 +41,6 @@ sub _new_socket die "$status\n\n$@"; } - # perl 5.005's IO::Socket does not have the blocking method. - eval { $sock->blocking(0); }; - $sock; }