Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message->parse() is incompatible with header() #147

Open
FGasper opened this issue Nov 25, 2020 · 1 comment
Open

Message->parse() is incompatible with header() #147

FGasper opened this issue Nov 25, 2020 · 1 comment

Comments

@FGasper
Copy link
Contributor

FGasper commented Nov 25, 2020

perl -MData::Dumper -MHTTP::Response -e'my $hdr = HTTP::Response->parse("HTTP/1.0 200 OK\r\na-b_c: haha\r\n\r\n"); print Dumper $hdr; print $hdr->header("a-b_c");'

^^ The above will show that haha isn’t printed. The Dumper output shows that the header is stored internaly as a-b_c, but when we go to fetch that value we get nothing because fetch() is looking for a-b-c.

I don’t see any outstanding issues about this. Without knowing why Message->parse() disables the underscore translation I‘m not sure what the proper fix would be. Maybe make header() search for the original as well as the hyphen-replaced version?

@oalders
Copy link
Member

oalders commented Nov 27, 2020

@vanHoesel thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants