Subject: | POE::Filter::HTTPHead and multi-valued headers |
Date: | Wed, 23 May 2007 11:09:54 -0400 |
To: | <bug-POE-Component-Client-HTTP [...] rt.cpan.org> |
From: | "Posnick, Jeffrey \(IT\)" <Jeffrey.Posnick [...] morganstanley.com> |
Hello,
I've found a problem with POE::Filter::HTTPHead 0.01 related to
processing HTTP response messages with multi-valued headers. When the
multiple values are returned in repeated headers, only the last value
will be retained in the HTTP::Headers object that gets created by
POE::Filter::HTTPHead.
E.g.:
Set-Cookie: abcd
Set-Cookie: efgh
will lead to only the "Set-Cookie: efgh" header being present in the
resulting object.
A small change to line 90 will correctly preserve multiple values:
$self->[WORK_RESPONSE]->header($1, $2)
changed to:
$self->[WORK_RESPONSE]->push_header($1, $2)
Any chance that this change can make it into the official release?
Cheers,
-j
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.