Question

I need to add a HTTP header field in the responses of a section of my site, the package instace (my section) is being viewed in a IFRAME and I want to declare a p3p field in order to be able to store cockies in IE 6/7/8 (login doesn't work well), I have an idea of how to do it in PHP and is quite simple:

<?php
header('P3P: CP="CAO PSA OUR"');
?>

but I didn't found how to do it in TCL/openacs, thanks for the help.

Was it helpful?

Solution

Based on Jim Lynch's response when you asked this question elsewhere, you just need to add it to the set of headers being produced for the page. I'd guess that something like this is probably easiest (assuming you don't want to hard-code the contents of the header; if you did, you could simplify a little):

set cpflags "CAO PSA OUR"
ns_set cput [ns_conn outputheaders] "P3P" "CP=\"$cpflags\""

To understand it, you need to read about ns_conn and ns_set from the AOLserver docs, as well as set from the standard Tcl documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top