Reputation: 551
I've noticed that it's almost an universal convention to prefix Http headers with HTTP_ when accessing them from a web server. Can anyone explain to me the circumstances about how this came about?
Upvotes: 2
Views: 848
Reputation: 143104
It sounds like you're talking about CGI scripts. The HTTP headers are passed as environment variables. As there may be other environment variables that have nothing to do with HTTP (eg: PATH), it makes sense to tack on a common prefix to reduce the chance of collisions.
Upvotes: 3