Subject: | [wish] Support for psgi_flatten* in HTTP::Headers::Fast |
Hello,
I have embraced (probably a bit too soon) the faster way to produce headers in PSGI format:
HTTP::Headers::Fast->psgi_flatten_without_sort
It turns out XSHeaders doesn't support this method, but it still is reported as existing, and fails silently, doing nothing.
Here's a minimal example:
bash$ perl -we 'use HTTP::Headers::Fast; my $hd = HTTP::Headers::Fast->new; $hd->push_header(content_type, "text/plain"); print $hd->can("psgi_flatten_without_sort") ? "can\n": "nope\n"; my $all = $hd->psgi_flatten_without_sort; print "@$all\n"; '
can
Content-Type text/plain
bash$ perl -MHTTP::XSHeaders -we 'use HTTP::Headers::Fast; my $hd = HTTP::Headers::Fast->new; $hd->push_header(content_type, "text/plain"); print $hd->can("psgi_flatten_without_sort") ? "can\n": "nope\n"; my $all = $hd->psgi_flatten_without_sort; print "@$all\n"; '
can
I think these two methods are worth being emulated because those who follow latest HTTP::Header::Fast development should also be likely to try out HTTP::XSHeaders, and this silent failure is moderately annoying and hard to notice early.
Thank you,