Skip Menu |

This queue is for tickets about the POE-Component-Server-SimpleHTTP CPAN distribution.

Report information
The Basics
Id: 38743
Status: resolved
Worked: 30 min
Priority: 0/
Queue: POE-Component-Server-SimpleHTTP

People
Owner: BINGOS [...] cpan.org
Requestors: martin.ferrari [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.46
Fixed in: (no value)



Subject: Extraneous DIEs when called from PoCo::Server::SOAP
As noted in #38351, there were some cases when POE would die with an "Did not get DONE/CLOSE event for Wheel ID 2" message. Looking more deeply I found that the real reason was a warning issued from SimpleHTTP (with FATAL=>'all' set) which was in case triggered by an incorrect check of $!. The attached patch is already being included in Debian, please consider merging it. Thanks, Tincho.
Subject: Don't_die_because_of_unrelated_stuff_in_$!.patch
Index: libpoe-component-server-simplehttp-perl/lib/POE/Component/Server/SimpleHTTP.pm =================================================================== --- libpoe-component-server-simplehttp-perl.orig/lib/POE/Component/Server/SimpleHTTP.pm +++ libpoe-component-server-simplehttp-perl/lib/POE/Component/Server/SimpleHTTP.pm @@ -769,20 +769,22 @@ sub Got_Input { # TODO if we received a malformed request, we will not have a request object # We need to figure out what we're doing because they can't always expect to have # a request object, or should we keep it from being ?undef'd? - $_[KERNEL]->post( - $_[HEAP]->{'LOGHANDLER'}->{'SESSION'}, - $_[HEAP]->{'LOGHANDLER'}->{'EVENT'}, - $request, - $response->connection->remote_ip(), - ) if $_[HEAP]->{'LOGHANDLER'}; - - # Warn if we had a problem dispatching to the log handler above - warn("I had a problem posting to event '", - $_[HEAP]->{'LOGHANDLER'}->{'EVENT'}, - "' of the log handler alias '", - $_[HEAP]->{'LOGHANDLE'}->{'SESSION'}, - "'. As reported by Kernel: '$!', perhaps the alias is spelled incorrectly for this handler?") - if $!; + if($_[HEAP]->{'LOGHANDLER'}) { + $! = undef; + $_[KERNEL]->post( + $_[HEAP]->{'LOGHANDLER'}->{'SESSION'}, + $_[HEAP]->{'LOGHANDLER'}->{'EVENT'}, + $request, + $response->connection->remote_ip()); + + # Warn if we had a problem dispatching to the log handler above + warn("I had a problem posting to event '", + $_[HEAP]->{'LOGHANDLER'}->{'EVENT'}, + "' of the log handler alias '", + $_[HEAP]->{'LOGHANDLE'}->{'SESSION'}, + "'. As reported by Kernel: '$!', perhaps the alias is spelled incorrectly for this handler?") + if $!; + } # If we received a malformed request then @@ -1007,20 +1009,22 @@ sub Request_Output { $_[HEAP]->{'REQUESTS'}->{ $id }->[1] = 1; # Log FINALLY If they have a logFinal handler registered, send out the needed information - $_[KERNEL]->call( - $_[HEAP]->{'LOG2HANDLER'}->{'SESSION'}, - $_[HEAP]->{'LOG2HANDLER'}->{'EVENT'}, - $_[HEAP]->{'REQUESTS'}{ $id }[3], - $response) - if $_[HEAP]->{'LOG2HANDLER'}; - - # Warn if we had a problem dispatching to the log handler above - warn("I had a problem posting to event '", - $_[HEAP]->{'LOG2HANDLER'}->{'EVENT'}, - "' of the log handler alias '", - $_[HEAP]->{'LOG2HANDLER'}->{'SESSION'}, - "'. As reported by Kernel: '$!', perhaps the alias is spelled incorrectly for this handler?") - if $!; + if($_[HEAP]->{'LOG2HANDLER'}) { + $! = undef; + $_[KERNEL]->call( + $_[HEAP]->{'LOG2HANDLER'}->{'SESSION'}, + $_[HEAP]->{'LOG2HANDLER'}->{'EVENT'}, + $_[HEAP]->{'REQUESTS'}{ $id }[3], + $response); + + # Warn if we had a problem dispatching to the log handler above + warn("I had a problem posting to event '", + $_[HEAP]->{'LOG2HANDLER'}->{'EVENT'}, + "' of the log handler alias '", + $_[HEAP]->{'LOG2HANDLER'}->{'SESSION'}, + "'. As reported by Kernel: '$!', perhaps the alias is spelled incorrectly for this handler?") + if $!; + } # Debug stuff
Thanks for this patch. Always great to get downstream patches punted back upstream. Show quoted text
>:)
BinGOs