Hi, I imagine someone has come across this problem before.
I'm receiving custom HTTP headers from a WAP Gateway. The headers contain a mixture of "_" and "-" characters. I have some PHP which does some processing before making an ongoing request to another application. The PHP needs to pass all headers received to the downstream application. However all "-" in header names have been converted to "_" by PHP before being stored in the $_SERVER global. So I don't know which were "-" and which were "_" when I make the ongoing request using the headers stored in $_SERVER.
Any ideas on how to solve this problem would be greatly appreciated.
HTTP Request Headers containing underscores and hyphens
Moderator: General Moderators
- turbolemon
- Forum Commoner
- Posts: 70
- Joined: Tue Jul 14, 2009 6:45 am
- Location: Preston, UK
Re: HTTP Request Headers containing underscores and hyphens
You using Apache? You could try this http://us3.php.net/manual/en/function.a ... eaders.php. It doesn't mention whether or not it mauls the header names, but it's worth a try.
Re: HTTP Request Headers containing underscores and hyphens
Thanks turbolemon, that did the trick.