Subject: | P3P header missing commas between header-fields |
According to the P3P spec at:
http://www.w3.org/TR/P3P/#syntax_ext
The P3P header-fields need to be comma separated:
2.2.2 HTTP Headers
Any document retrieved by HTTP MAY point to a policy reference file through the use of a new response header, the P3P header ([P3P-HEADER]). If a site is using P3P headers, it SHOULD include this on responses for all appropriate request methods, including HEAD and OPTIONS requests.
The P3P header gives one or more comma-separated directives. The syntax follows:
[1] p3p-header = `P3P: ` p3p-header-field *(`,` p3p-header-field)
Here's a patch to CGI.pm v2.91 which fixes the problem:
Index: CGI.pm
===================================================================
RCS file: /home/cvs/wssource/cgi-bin/lib/CGI.pm,v
retrieving revision 2.1
retrieving revision 2.2
diff -c -r2.1 -r2.2
*** CGI.pm 25 Apr 2003 15:46:45 -0000 2.1
--- CGI.pm 25 Apr 2003 15:47:52 -0000 2.2
***************
*** 1277,1283 ****
push(@header,"Window-Target: $target") if $target;
if ($p3p) {
$p3p = join ' ',@$p3p if ref($p3p) eq 'ARRAY';
! push(@header,qq(P3P: policyref="/w3c/p3p.xml" CP="$p3p"));
}
# push all the cookies -- there may be several
if ($cookie) {
--- 1277,1283 ----
push(@header,"Window-Target: $target") if $target;
if ($p3p) {
$p3p = join ' ',@$p3p if ref($p3p) eq 'ARRAY';
! push(@header,qq(P3P: policyref="/w3c/p3p.xml", CP="$p3p"));
}
# push all the cookies -- there may be several
if ($cookie) {