Edited by: Kholiah on 07/07/2011 10:53:43Edited by: Kholiah on 05/07/2011 16:56:17I'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.mysite.com/::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