Skip Menu |

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

Report information
The Basics
Id: 107397
Status: new
Priority: 0/
Queue: POE-Component-Server-SimpleHTTP

People
Owner: Nobody in particular
Requestors: adrian [...] gt.net
Cc:
AdminCc:

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



Subject: Patch: Silence warnings from must_keepalive()
Date: Mon, 28 Sep 2015 16:21:19 -0700
To: bug-POE-Component-Server-SimpleHTTP [...] rt.cpan.org
From: Adrian Yee <adrian [...] gt.net>
A simple patch to silence warnings from must_keepalive(). HTTP::Request->header() (inherited from HTTP::Header->header()) returns undef if the requested header doesn't exist. Patch also attached. Adrian --- POE/Component/Server/SimpleHTTP.pm.orig 2015-09-28 16:06:40.535414946 -0700 +++ POE/Component/Server/SimpleHTTP.pm 2015-09-28 16:12:03.682432103 -0700 @@ -797,11 +797,11 @@ return 0 if $resp->is_error; # Connection is a comma-seperated header - my $conn = lc $req->header('Connection'); + my $conn = lc ($req->header('Connection') || ''); return 0 if ",$conn," =~ /,\s*close\s*,/; - $conn = lc $req->header('Proxy-Connection'); + $conn = lc ($req->header('Proxy-Connection') || ''); return 0 if ",$conn," =~ /,\s*close\s*,/; - $conn = lc $resp->header('Connection'); + $conn = lc ($resp->header('Connection') || ''); return 0 if ",$conn," =~ /,\s*close\s*,/; # HTTP/1.1 = keep

Message body is not shown because sender requested not to inline it.