Pages: [1] :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Kholiah
|
Posted - 2011.07.05 15:54:00 -
[1]
I'm trying the trust mechanism and the retrieving of HTTP_EVE.. headers.
I did as follows
The homepage view function
Quote: def index(request): # Home page view function _ret = HttpResponse() _ret['eve.trustme'] = 'http://mysite.com/::This 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
Quote: <body onload = "CCPEVE.requestTrust('http://www.mysite.com')">
but same effect, no HTTP_EVE... headers.
Using php insted does not give me any problems and shows all HTTP_EVE... headers
Quote: <? ini_alter("session.use_cookies","1"); ob_start(); ?> <HTML> <HEAD> <TITLE>Testpage</TITLE> </HEAD> <BODY> <? if (!(strpos($HTTP_USER_AGENT,"EVE-IGB")===false)) { if ($HTTP_SERVER_VARS["HTTP_EVE_TRUSTED"]=="no") { header("eve.trustme:http://www.alkatron.it/::please allow me to access your pilot information."); } }
print_r($_SERVER);?> </BODY> </HTML> <? 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
Caldari 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. --- "A fool flatters himself, a wise man flatters the fool."
Co-founder of NEMIA. |
Kholiah
|
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...
|
Kholiah
|
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.
bye
|
|
|
|
Pages: [1] :: one page |
First page | Previous page | Next page | Last page |