in reply to Underscores changed to hyphens by HTTP::Proxy header filter
http://cpansearch.perl.org/src/GAAS/libwww-perl-5.825/t/base/headers.t#!/usr/bin/perl --- use strict; use warnings; use HTTP::Headers; my $h = HTTP::Headers->new; $h->header( qw' SM_USER waldo '); print $h->as_string; __END__ SM-USER: waldo
# Check with FALSE $HTML::Headers::TRANSLATE_UNDERSCORE { local($HTTP::Headers::TRANSLATE_UNDERSCORE); $HTTP::Headers::TRANSLATE_UNDERSCORE = undef; # avoid -w warning $h = HTTP::Headers->new; $h->header(abc_abc => "foo"); $h->header("abc-abc" => "bar"); ok($h->header("ABC_ABC"), "foo"); ok($h->header("ABC-ABC"),"bar"); ok($h->remove_header("Abc_Abc")); ok(!defined($h->header("abc_abc"))); ok($h->header("ABC-ABC"), "bar"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Underscores changed to hyphens by HTTP::Proxy header filter
by Anonymous Monk on Apr 09, 2009 at 09:59 UTC |