How can I get PHP to display the headers it received from a browser?

Viewed 113664

Are they all stored in $_SERVER? Even custom ones?

7 Answers

What's happening is that http headers' names are rewritten:

  1. Prefixed with HTTP_
  2. Replaced '-' by '_'
  3. Upper Cased

That's at least what I've observed for my custom headers and apache 2.4. This is not canonical nor a comprehensive list of what you should check, but it may lead you to the right direction as for me none of the above helped.

Related