Skip Menu |

This queue is for tickets about the AnyEvent-HTTPD CPAN distribution.

Report information
The Basics
Id: 69744
Status: resolved
Priority: 0/
Queue: AnyEvent-HTTPD

People
Owner: Nobody in particular
Requestors: encryptio [...] gmail.com
Cc:
AdminCc:

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



Subject: Headers with default values cannot be removed
Currently, there's no way (that I see) to remove a header from a response that is given a default value in HTTPConnection. Possible fix: To me, it's natural to allow setting header values to undef to denote that they should not be replaced with default values. In the HTTPConnection code for version 0.92, this amounts to replacing a few "unless defined" with "unless exists", and by adding a line in the header text creation such as "next unless defined $v;"
Subject: Re: [rt.cpan.org #69744] Headers with default values cannot be removed
Date: Mon, 25 Jul 2011 08:08:53 +0200
To: Chris Kastorff via RT <bug-AnyEvent-HTTPD [...] rt.cpan.org>
From: Robin Redeker <elmex [...] ta-sa.org>
Hi! On Sun, Jul 24, 2011 at 09:34:25PM -0400, Chris Kastorff via RT wrote: Show quoted text
> Sun Jul 24 21:34:23 2011: Request 69744 was acted upon. > Transaction: Ticket created by ENCRYPTIO > Queue: AnyEvent-HTTPD > Subject: Headers with default values cannot be removed > Broken in: 0.92 > Severity: Normal > Owner: Nobody > Requestors: encryptio@gmail.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=69744 > > > > Currently, there's no way (that I see) to remove a header from a response > that is given a default value in HTTPConnection. > > Possible fix: > > To me, it's natural to allow setting header values to undef to denote > that they should not be replaced with default values. In the > HTTPConnection code for version 0.92, this amounts to replacing a few > "unless defined" with "unless exists", and by adding a line in the header > text creation such as "next unless defined $v;"
That sounds great! However, I'm currently on vacation. If you could make a patch to the recent version from the repository, inclusion of the fix will be much faster! If would also be great if the patch could drop one or two lines of documentation in the right place. The repo can be fetched with GI from here: git clone http://git.ta-sa.org/AnyEvent-HTTPD.git Thanks for the report and fix idea! Greetings, Robin -- Robin Redeker | Deliantra, the free code+content MORPG elmex@ta-sa.org / r.redeker@gmail.com | http://www.deliantra.net http://www.ta-sa.org/ |
Fixed in version 0.93, which is on it's way to CPAN. Thanks & Greetings, Robin