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/ |