Skip Menu |

This queue is for tickets about the HTTP-Message CPAN distribution.

Report information
The Basics
Id: 115670
Status: resolved
Priority: 0/
Queue: HTTP-Message

People
Owner: Nobody in particular
Requestors: branislav.zahradnik [...] gooddata.com
Cc:
AdminCc:

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



Subject: HTTP::Config->match generates "uninitialized value" in matching method
Date: Tue, 28 Jun 2016 15:24:37 +0200
To: bug-HTTP-Message [...] rt.cpan.org
From: Branislav Zahradnik <branislav.zahradnik [...] gooddata.com>
Use case: LWP::UserAgent response redirect handler with matching specific response header, eg "Client-Warning" Current code: m_header__ => sub { my($v, $k, $uri, $request, $response) = @_; return unless $request; return 1 if $request->header($k) eq $v; return 1 if $response && $response->header($k) eq $v; return 0; }, Quick fix: m_header__ => sub { my($v, $k, $uri, $request, $response) = @_; return unless $request; return 1 if $request->header($k) && $request->header($k) eq $v; return 1 if $response && $response->header($k) && $response->header($k) eq $v; return 0; }, or just disable warnings in those lamdas.