Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

gav (2710)

gav
  (email not shown publicly)
http://www.estey.com/
AOL IM: flufflegavin (Add Buddy, Send Message)

Hacker in NYC.

Journal of gav (2710)

Wednesday November 19, 2003
02:54 PM

CGI::Simple and P3P headers

[ #15881 ]

If you are using CGI::Simple and want to set a P3P header so that cookies on IE6 will work correctly, but you don't want to use a policyref file (you don't need to) you can make this quick fix. Change line 696 from:

push(@header, qq(P3P: policyref="/w3c/p3p.xml", CP="$p3p"));

to

push(@header, qq(P3P: $p3p));

Now you can correctly set a P3P header, eg:

$cgi->header( -P3P => 'CP="NOI DSP COR NID TAIa OUR NOR"' );

I've got no idea what that compact policy means, but it does the trick. The whole concept behind P3P makes no sense to me.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I just use Apache's mod_headers to add these to all responses. It's a lot simpler, and since there's no harm in including these for every response, it's simpler than sticking it somewhere in my app.