Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 43719
Status: resolved
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: antonio [...] dyne.org
Cc: 216821 [...] bugs.debian.org
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 5.825
Fixed in: (no value)



CC: 216821 [...] bugs.debian.org
Subject: support for nonblocking sockets
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; }
На 28 февр. 2009, сб 02:20:16, antonio написа: Show quoted text
> 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
Subject: drop-non-blocking-socket.patch
Description: drop $sock->blocking(0) call, requires handling of EINPROGRESS Author: Michael Shields <shields@msrl.com> Reviewed-By: Damyan Ivanov <dmn@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; }
Subject: Bug#216821: Info received ([rt.cpan.org #43719] support for nonblocking sockets)
Date: Fri, 11 Apr 2014 21:18:05 +0000
To: bug-libwww-perl [...] rt.cpan.org
From: owner [...] bugs.debian.org (Debian Bug Tracking System)
Thank you for the additional information you have supplied regarding this Bug report. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org> If you wish to submit further information on this problem, please send it to 216821@bugs.debian.org. Please do not send mail to owner@bugs.debian.org unless you wish to report a problem with the Bug-tracking system. -- 216821: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=216821 Debian Bug Tracking System Contact owner@bugs.debian.org with problems