uname='Win32 strawberry-perl 5.18.2.1 #1 Tue Jan 7 22:32:35 2014 x64'
Best Regards
Jesper Persson
Daniel de Oliveira Mantovani
unread,
May 21, 2014, 8:12:58 AM5/21/14
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jesper Persson, libwww
Hi, Jesper. It's happen because it should happen. You don't have the
error because you are not handle error.
This happen because LWP has a timeout to wait the server response,
after this timeout it will return a timeout error. In your case, you
don't handle the error the only stuff you get is nothing.
> Hi, Jesper. It's happen because it should happen. You don't have the
> error because you are not handle error.
>
> This happen because LWP has a timeout to wait the server response,
> after this timeout it will return a timeout error. In your case, you
> don't handle the error the only stuff you get is nothing.
But that fact that LWP has timeout, means it _should_ _not_ _hang forever_
Daniel de Oliveira Mantovani
unread,
May 21, 2014, 3:41:27 PM5/21/14
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Victor Efimov, Jesper Persson, libwww
I *know it*, I understood in first place, that he was getting undef
from "get" function and not hang forever.
Jesper Persson
unread,
May 26, 2014, 2:47:35 AM5/26/14
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libwww
The "hang" happens in c:\strawberry\perl\vendor\lib\Net\HTTP\Methods.pm in the procedure
sub read_response_headers
where it calls
my($status, $eol) = my_readline($self, 'Status');
Its actually not a hang because perl is looping in my_readline where it keeps repeating the code:
READ:
{
die "read timeout" unless $self->can_read;
my $n = $self->sysread($_, 1024, length);
unless (defined $n) {
redo READ if $!{EINTR} || $!{EAGAIN};
Should that be possible? Maybe the procedure could have a max number of "redo READ"'s or a timer to give up after some time?
Best regards
Jesper Persson
Steffen Ullrich
unread,
Jun 1, 2014, 5:55:42 PM6/1/14
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lib...@perl.org
>
> READ:
> {
> die "read timeout" unless $self->can_read;
> my $n = $self->sysread($_, 1024, length);
> unless (defined $n) {
> redo READ if $!{EINTR} || $!{EAGAIN};
The server makes a connection reset if you try to access
https://www.butler.edu/boa/default.aspx. On unix this will set $! to ECONNRESET,
and for unknown reason this will not set $! on Windows with Strawberry
perl5.18.2 , but only returns "SSL read error" from the SSL layer.
Thus $! will stay at EINTR from the previous error and it will loop forever.
IO::Socket::SSL 1.992 (just released) works around this problem by resetting $!
before doing I/O. This way $! will no longer stay at $!, but will be undef and
thus the loop will exit, albeit with no specific error. The real fix would be of
course to set $! to ECONNRESET in the underlying IO::Socket layer if the TCP
connection was reset.
Steffen
Jesper Persson
unread,
Jun 2, 2014, 11:55:46 AM6/2/14
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Steffen Ullrich, libwww
Hi Steffen,
thank you for taking your time to fix/workaround this.
I have just updated IO::Socket::SSL to version 1.992 and I can verify that the "hang" no longer happens.