These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

IGB Headers and Apache 2.4 problems

Author
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#1 - 2012-09-11 00:33:10 UTC
Evening all.

Just spent some time updating my server and I ran into an interesting little problem. None of the IGB headers are coming through in it. Not a huge deal for what I'm doing, but annoying as I was using the HTTP_EVE_TRUSTED header to determine if it should use the javascript calls or not.

Took a little digging, but I found the following:

http://httpd.apache.org/docs/trunk/en/env.html#fixheader

It seems that 2.4 is stripping the headings, as it doesn't like the underscores in them.

There is a fix, but it's not a nice one (unless you can write a reg exp to handle all the ones you care about)


In your apache config, add the following, or similar., then restart. Then you're cooking with gas.

SetEnvIfNoCase ^HTTP_EVE_TRUSTED$ ^(.*)$ fix_eve_trusted=$1
RequestHeader set EVE-TRUSTED %{fix_eve_trusted}e env=fix_eve_trusted

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Liu Ellens
Sebiestor Tribe
Minmatar Republic
#2 - 2012-09-11 07:14:42 UTC
I'm also voting for a separate new set of IGB headers to be sent (using dashes and preferably "X-" prefixes, so in the likes of "X-EVE-trusted" or so).

Trenker had found a similar issue using nginx; And for the same reason I currently have an open ticket at my web service provider, taking weeks to be processed. Ugh

This should be addressed - Ideas that come to my mind:

  • IGB should always send these extra (valid) headers; more data spam, but least work for server
  • Server can response with a header such as "X-EVE-Supported" or similar, which could switch in the types of headers the IGB sends. (I'm thinking here in the lines of a "Supported" header as in RTSP 2.0)

And in the future, the old headers are to be deprecated and removed.

Well, they oughta know what to do with them hogs out there for shure.

Trenker
#3 - 2012-09-11 18:59:45 UTC  |  Edited by: Trenker
Liu Ellens wrote:
I'm also voting for a separate new set of IGB headers to be sent (using dashes and preferably "X-" prefixes, so in the likes of "X-EVE-trusted" or so).


+1

IMHO this is a bug of the IGB, so did someone file a bug report yet?

And i think it is acceptable to simply replace the existing headers, if it is announced a month or two in advance.
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#4 - 2012-09-11 20:41:58 UTC
I stuck in a bug this morning.

144203


Now, I'm not really expecting to see anything happen with it, as it is, really, a trivial issue. But you never know Smile

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Liu Ellens
Sebiestor Tribe
Minmatar Republic
#5 - 2012-09-12 05:32:28 UTC
Trenker wrote:
And i think it is acceptable to simply replace the existing headers, if it is announced a month or two in advance.

I prefer a version compatible variant before dropping the old ones; This way, I could have the new headers thanks to a client hotfix "tomorrow" and in some months the old ones can be removed. (Or did you mean that anyway as well, only emphasizing the point that the old ones can simply be removed at some point?)

And thanks, Steve!

Well, they oughta know what to do with them hogs out there for shure.

Relentles
Blah Blah Holdings
#6 - 2012-09-24 11:06:08 UTC
ah thx steven, looks like for i will be going back to apache 2.2.14, that worked for some but no all headers
xHjfx
The Legion of Spoon
Curatores Veritatis Alliance
#7 - 2012-11-12 11:59:14 UTC
Liu Ellens wrote:
I'm also voting for a separate new set of IGB headers to be sent (using dashes and preferably "X-" prefixes, so in the likes of "X-EVE-trusted" or so).

Trenker had found a similar issue using nginx; And for the same reason I currently have an open ticket at my web service provider, taking weeks to be processed. Ugh

This should be addressed - Ideas that come to my mind:

  • IGB should always send these extra (valid) headers; more data spam, but least work for server
  • Server can response with a header such as "X-EVE-Supported" or similar, which could switch in the types of headers the IGB sends. (I'm thinking here in the lines of a "Supported" header as in RTSP 2.0)

And in the future, the old headers are to be deprecated and removed.


The correct nginx fix would be:

underscores_in_headers on;
TheSkeptic
Federal Navy Academy
Gallente Federation
#8 - 2012-11-12 13:52:57 UTC  |  Edited by: TheSkeptic
Anyone running 2.4 tried using apache_request_headers() ?

http://stackoverflow.com/questions/12389423/xampp-is-removing-http-headers-with-underscores

Edit: I'm going to guess dispite the stackoverflow response that this doesn't actually work (currently unable to test it) given it's just an alias to getallheaders, and both are subjected to whatever apache filtering is in place.

...

Lokals
Royal Amarr Institute
Amarr Empire
#9 - 2012-11-12 14:16:07 UTC
TheSkeptic wrote:
Anyone running 2.4 tried using apache_request_headers() ?

http://stackoverflow.com/questions/12389423/xampp-is-removing-http-headers-with-underscores

Edit: I'm going to guess dispite the stackoverflow response that this doesn't actually work (currently unable to test it) given it's just an alias to getallheaders, and both are subjected to whatever apache filtering is in place.



Just tested it and it work for every header!



PS: Steve's solution also work but only for the EVE_TRUSTED header. SOLARSYSTEMID or REGIONNAME didnt work.
Cyerus
University of Caille
Gallente Federation
#10 - 2012-11-12 14:37:23 UTC  |  Edited by: Cyerus
I feel the need to point out that this problem technically neither is CCPs nor Apache / nginx / IIS's fault.
However, I do agree CCP should change the HTTP Headers to use dash ( - ) instead of underscore ( _ ) to fix this problem once and for all.

Quote detailing the problem as to why IIS has the same problems with HTTP Headers using underscore ( _ ).
Quote:
According to HTTP specifications, header names can include any CHAR except CTLs or separators. In particular, both "-" (dash) and "_" (underscore) are valid characters in header name.

The problem should be clear now. The CGI 1.1 Specification defines a substitution of "-" in Request Header to "_" in Server Varible names, but what is the substitution of "_" in Request Headers in Server Variable??? It cannot be "_" in Server Variable names, and it is conveniently undefined...

Oops! Did we just spot a flaw in a sacred specification underlying major Internet Applications? You bet. Oh no, heavens forbid that there is a flaw in a publicly implemented specification! The sky is falling!