|go ahead... be a heretic|
Underscores changed to hyphens by HTTP::Proxy header filterby jds17 (Pilgrim)
|on Apr 09, 2009 at 09:12 UTC||Need Help??|
jds17 has asked for the
wisdom of the Perl Monks concerning the following question:
Hi, I have written a simple HTTP Proxy which I want to use to add an entry to the header of every request passing through it. My problem is that all underscores "_" get changed to hyphens "-" in the entries' keys and the key is converted to lowercase. The code looks as follows:
The ini file:
I.e. in the current example, the name of the header entry comes out as "sm-user" instead of "SM_USER". What am I doing wrong?
Update: Thank you guys, using the flag $HTTP::Headers::TRANSLATE_UNDERSCORE solved the issue!