Skip Menu |
 

This queue is for tickets about the SOAP-Lite CPAN distribution.

Report information
The Basics
Id: 18185
Status: rejected
Priority: 0/
Queue: SOAP-Lite

People
Owner: Nobody in particular
Requestors: chris+rt [...] chrisdolan.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.67
Fixed in: (no value)



Subject: Check for undef connection in SOAP::Transport::HTTP::Daemon
Download (untitled) / with headers
text/plain 673b
The HTTP::Daemon class has an option to set a timeout for a listening connection. If this timeout is set and the daemon doesn't receive a connection within that timeout, then the accept() method returns undef. The SOAP::Transport::HTTP::Daemon class doesn't check for that undef. The following simple patch corrects this. --- HTTP.pm-orig 2006-03-15 09:34:43.000000000 -0600 +++ HTTP.pm 2006-03-15 09:36:40.000000000 -0600 @@ -491,6 +491,7 @@ sub handle { my $self = shift->new; while (my $c = $self->accept) { + next if !$c; # undef on timeout while (my $r = $c->get_request) { $self->request($r); $self->SUPER::handle; Chris
Download (untitled) / with headers
text/plain 397b
This is not a bug, it's a feature. If you set a timeout value, handle() will listen for connection for that time, and terminate if no connection has been received. This is the intended behavior. The check for undef is implicit in while (my $c = $self->accept()) The alternative - looping indefinitely and doing a next on a undef connection would effectively make the timeout unusable. Martin


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.