Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Upon receiving a request without 'connection' header,

Plack::Handler::AnyEvent::HTTPD::Connection issued a perl warning. Fixed
by checking if 'connection' exists first.
  • Loading branch information...
commit 7f55da35b9a1171c45185828fc7409a3e9f31436 1 parent 8efa6bb
Mike Schilli authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Plack/Handler/AnyEvent/HTTPD.pm
View
4 lib/Plack/Handler/AnyEvent/HTTPD.pm
@@ -169,7 +169,9 @@ use parent qw(AnyEvent::HTTPD::HTTPConnection);
sub handle_request {
my($self, $method, $uri, $hdr, $cont) = @_;
- $self->{keep_alive} = ($hdr->{connection} =~ /keep-alive/io);
+ if( $hdr->{connection} ) {
+ $self->{keep_alive} = ($hdr->{connection} =~ /keep-alive/io);
+ }
$self->event(request => $method, $uri, $hdr, $cont);
}
Please sign in to comment.
Something went wrong with that request. Please try again.