open All Channels
seplocked EVE Technology Lab
blankseplocked SOLVED Do someone retrieve IGB headers with python?
This thread is older than 90 days and has been locked due to inactivity.

Author Topic

Posted - 2011.07.05 15:54:00 - [1]

Edited by: Kholiah on 07/07/2011 10:53:43
Edited by: Kholiah on 05/07/2011 16:56:17
I'm trying the trust mechanism and the retrieving of HTTP_EVE.. headers.

I did as follows

The homepage view function

def index(request): # Home page view function
_ret = HttpResponse()
_ret['eve.trustme'] = ' site needs to be trusted.'
for k,v in request.META.iteritems():
_ret.write("<p>%s = %s</p>" % (k,v))
return _ret

I checked with a headers tamper and 'eve.trustme' is present and received by the browser.

From IGB I trusted my site

I go to that page and after reloading i would see the HTTP_EVE... headers but i can see only the standard everypage headers, no HTTP_EVE...

Using the tamperer i sent a custom headers to the request object (as sent by browser) and my custom headers is shown....

I tried also using
<body onload = "CCPEVE.requestTrust('')">
but same effect, no HTTP_EVE... headers.

Using php insted does not give me any problems and shows all HTTP_EVE... headers

<? ini_alter("session.use_cookies","1");
if (!(strpos($HTTP_USER_AGENT,"EVE-IGB")===false))
header("eve.trustme: allow me to access your pilot information.");

<? ob_end_flush(); ?>

Do I miss something?
If someone already did this before, can i see the code or an example?

Thanks to everyone

Callean Drevus
Icosahedron Crafts and Shipping
Silent Infinity
Posted - 2011.07.05 17:06:00 - [2]

Edited by: Callean Drevus on 05/07/2011 17:07:24
The HTTP_EVE headers might not be the HTTP_EVE headers in python. PHP adds the HTTP_ part, so it might have something to do with that.

I'm just talking off the top of my hat here, I know this is the case, but for all I know python might add the HTTP_ too :P I'm not really familiar with python.

Posted - 2011.07.05 17:18:00 - [3]

Thanks for the answer, with the 'for' loop i print all the variables, HTTP_ and not, but no one contains 'eve' or my pilot information...

Posted - 2011.07.07 10:57:00 - [4]

The problem was that i use a NGINX web server where the directive "underscores_in_headers" is off by default, enabling that solve the problem.



This thread is older than 90 days and has been locked due to inactivity.


The new forums are live

Please adjust your bookmarks to

These forums are archived and read-only