Bug#216821: [rt.cpan.org #43719] support for nonblocking sockets
Damyan Ivanov via RT
bug-libwww-perl at rt.cpan.org
Fri Apr 11 21:08:38 UTC 2014
<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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: drop-non-blocking-socket.patch
Type: text/x-diff
Size: 515 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20140411/7fb2a328/attachment.patch>
More information about the pkg-perl-maintainers
mailing list