Skip Menu |
 

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

Report information
The Basics
Id: 123850
Status: open
Priority: 0/
Queue: HTTP-XSHeaders

People
Owner: Nobody in particular
Requestors: khedin [...] cpan.org
Cc:
AdminCc:

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



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,
Subject: Re: [rt.cpan.org #123850] [wish] Support for psgi_flatten* in HTTP::Headers::Fast
Date: Tue, 12 Dec 2017 09:22:45 +0100
To: bug-HTTP-XSHeaders [...] rt.cpan.org
From: Gonzalo Diethelm <gonzalo.diethelm [...] gmail.com>
Download (untitled) / with headers
text/plain 1.9k
Hello, Could you provide a couple of tests that pass with HTTP::Headers::Fast when using psgi_flatten_without_sort? That would be a good way to make sure the implementation in XSHeaders does the right thing. Even better would be patches, but I know that's asking for too much... :-) Cheers, Gonzo On Sun, Dec 10, 2017 at 12:37 AM, Konstantin S. Uvarin via RT < bug-HTTP-XSHeaders@rt.cpan.org> wrote: Show quoted text
> Sat Dec 09 18:37:15 2017: Request 123850 was acted upon. > Transaction: Ticket created by Dallaylaen > Queue: HTTP-XSHeaders > Subject: [wish] Support for psgi_flatten* in HTTP::Headers::Fast > Broken in: 0.400003 > Severity: (no value) > Owner: Nobody > Requestors: khedin@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=123850 > > > > 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, >
-- Gonzalo Diethelm gonzalo.diethelm@gmail.com


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.