When specifying custom header containing underscores using HTTP::Request
from LWP::UserAgent
, the underscores are changed to hyphens:
use LWP::UserAgent;
my $rq = HTTP::Request->new("GET", "http://cpan.org");
$rq->header("X-FOO_BAR", "xyzzy");
print $rq->as_string;
outputs:
GET http://cpan.org
X-FOO-BAR: xyzzy
Is there a way to turn this behavior off?
- perl v5.26.2
- LWP:UserAgent 1.9601
- linux 4.17.8-1-ARCH