Does Zope translate http-equiv statements? I always thought that the *client* interpreted http-equiv statements. But now I'm not sure anymore. Does Zope translate http-equiv statements in the HTML-header and put these into the HHTP-header?
----- Original Message ----- From: "Lennart Regebro" <lennart@regebro.nu> To: <zope@zope.org> Sent: Thursday, February 14, 2002 10:09 Subject: [Zope] Does Zope translate http-equiv statements?
Does Zope translate http-equiv statements?
I always thought that the *client* interpreted http-equiv statements. But now I'm not sure anymore. Does Zope translate http-equiv statements in the HTML-header and put these into the HHTP-header?
What is a HTML header ? I assume you mean meta-tags ?! Zope does not care about http-equiv statements. Why should it ? - aj --------------------------------------------------------------------- - Andreas Jung Zope Corporation - - EMail: andreas@zope.com http://www.zope.com - - "Python Powered" http://www.python.org - - "Makers of Zope" http://www.zope.org - - "Life is too short to (re)write parsers" - ---------------------------------------------------------------------
From: "Andreas Jung" <andreas@zope.com>
What is a HTML header ?
You know, the part between <HEAD> and </HEAD>... :-)
I assume you mean meta-tags ?!
I do, yes.
Zope does not care about http-equiv statements. Why should it ?
No reason at all, really. Some servers do and I'm trying to figure out wether it is IE6 or the w3.org P3P validator that has a bug, and in that case which bug it is. The P3P validator is happy with this statement: <meta http-equiv="P3P" content="CP='CAO DSP COR LAW IND UNI COM NAV CURa ADMa DEVa OUR'"> IE6 does not like it, but they both like: <dtml-call "RESPONSE.setHeader('P3P','CP=' + _.chr(34) + 'CAO DSP COR LAW IND UNI COM NAV CURa ADMa DEVa OUR' + _.chr(34) )"> Now, as you see, there are two differences here. One is an http-equiv, and the other is that the single and double quotes are switched.
----- Original Message ----- From: "Lennart Regebro" <lennart@regebro.nu> To: "Andreas Jung" <andreas@zope.com>; <zope@zope.org> Sent: Thursday, February 14, 2002 11:12 Subject: Re: [Zope] Does Zope translate http-equiv statements?
From: "Andreas Jung" <andreas@zope.com>
What is a HTML header ?
You know, the part between <HEAD> and </HEAD>... :-)
I assume you mean meta-tags ?!
I do, yes.
Zope does not care about http-equiv statements. Why should it ?
No reason at all, really. Some servers do and I'm trying to figure out wether it is IE6 or the w3.org P3P validator that has a bug, and in that case which bug it is. The P3P validator is happy with this statement:
<meta http-equiv="P3P" content="CP='CAO DSP COR LAW IND UNI COM NAV CURa ADMa DEVa OUR'">
IE6 does not like it, but they both like: <dtml-call "RESPONSE.setHeader('P3P','CP=' + _.chr(34) + 'CAO DSP COR LAW IND UNI COM NAV CURa ADMa DEVa OUR' + _.chr(34) )">
Now, as you see, there are two differences here. One is an http-equiv, and the other is that the single and double quotes are switched.
HTTP-equiv is only for the web client. In your case I would slap the guys from M$ for yet-another-non-compliant-implementation. Cheers, Andreas
From: "Andreas Jung" <andreas@zope.com>
HTTP-equiv is only for the web client.
Thats what I thought too, but some server translate this. Why, I dont' know...
In your case I would slap the guys from M$ for yet-another-non-compliant-implementation.
Nope, because we have found the bug. It is the w3c validator that accepts single quotes, where the standard specifies double quotes. The responsible people are already busy slapping themselves! :-)
Andreas and Lennart, Excuse me if perhaps I'm misunderstanding you and you already know this.. but.. "The part between <HEAD> and </HEAD>" isn't the same as what most people mean when they refer to the "header" actually.. The 'header' of an HTML document is rarely seen, unless you can sit and watch the streamed exchange of data between the client and server directly.. (using special tools, - sometimes this is *quite* useful in debugging an interaction..) It's in the "real" (almost always unseen) header that the client makes the "GET" statement and it's also where the exchange that determines mime-types happens.. It's also where you might get commands such as a redirect or a 404 not found..(or other response codes..) <dtml-call "RESPONSE.setHeader ... DOES effect the stuff that happens in the "real" header, and that's why it's such a useful command.. The stuff in the HEAD can frequently be ignored if it contradicts something in the real header.. This is the thing that varies by browser.. Take a look at the HTTP specification.. it's all in there, and more.. Hope that helps! Chris Beaumont
----- Original Message ----- From: "Lennart Regebro" <lennart@regebro.nu> To: "Andreas Jung" <andreas@zope.com>; <zope@zope.org> Sent: Thursday, February 14, 2002 11:12 Subject: Re: [Zope] Does Zope translate http-equiv statements?
From: "Andreas Jung" <andreas@zope.com>
What is a HTML header ?
You know, the part between <HEAD> and </HEAD>... :-)
I assume you mean meta-tags ?!
I do, yes.
Zope does not care about http-equiv statements. Why should it ?
No reason at all, really. Some servers do and I'm trying to figure out wether it is IE6 or the w3.org P3P validator that has a bug, and in that case which bug it is. The P3P validator is happy with this statement:
<meta http-equiv="P3P" content="CP='CAO DSP COR LAW IND UNI COM NAV CURa ADMa DEVa OUR'">
IE6 does not like it, but they both like: <dtml-call "RESPONSE.setHeader('P3P','CP=' + _.chr(34) + 'CAO DSP COR LAW IND UNI COM NAV CURa ADMa DEVa OUR' + _.chr(34) )">
Now, as you see, there are two differences here. One is an http-equiv, and the other is that the single and double quotes are switched.
HTTP-equiv is only for the web client. In your case I would slap the guys from M$ for yet-another-non-compliant-implementation.
Cheers, Andreas
Just to add my 2 pennyworth to the discussion: looking at the following URL http://www.w3.org/TR/REC-html40/struct/global.html#edef-META#edef-META, it says: <quote> META and HTTP headers The http-equiv attribute can be used in place of the name attribute and has a special significance when documents are retrieved via the Hypertext Transfer Protocol (HTTP). HTTP servers may use the property name specified by the http-equiv attribute to create an [RFC822]-style header in the HTTP response. Please see the HTTP specification ([RFC2616]) for details on valid HTTP headers. ... </quote> My copy of the HTML 4 language spec says: <quote> The HTTP-EQUIV attribute may be used in place of the NAME attribute to indicate that the property is an HTTP header. Some servers will send the HTTP header specified in the META element, and browsers often recognize the header even when it is not sent by the server. Examples: ... </quote> So it would appear that Zope could care about <META http-equiv ...> tags in outgoing html documents and could automatically use them to place additional lines into the HTTP response headers. And that browsers may respond to <META http-equiv ...> tags as though the server had used them to add to the HTTP response headers even if it didn't. On a quick search of the zope source code I couldn't find any code that seemed to be looking for <META http-equiv ...> in the prospective outgoing message and transmitting extra headers. From a coding standpoint it would be pain in the neck having to read ahead but not yet send the outgoing HTML in order to capture and then transmit the extra HTTP response headers, and only when the closing </HEAD> tag has been read back up and start sending the content. I suspect that using RESPONSE.setHeader to explicitly add HTTP response headers is probably the wisest and most reliable course if you really want the browser to receive and react to a legitimate HTTP header. Don't you just love standards :) At 09:37 14/02/2002 -0800, Chris Beaumont wrote:
Andreas and Lennart,
Excuse me if perhaps I'm misunderstanding you and you already know this.. but..
"The part between <HEAD> and </HEAD>" isn't the same as what most people mean when they refer to the "header" actually..
The 'header' of an HTML document is rarely seen, unless you can sit and watch the streamed exchange of data between the client and server directly.. (using special tools, - sometimes this is *quite* useful in debugging an interaction..)
It's in the "real" (almost always unseen) header that the client makes the "GET" statement and it's also where the exchange that determines mime-types happens.. It's also where you might get commands such as a redirect or a 404 not found..(or other response codes..)
<dtml-call "RESPONSE.setHeader ... DOES effect the stuff that happens in the "real" header, and that's why it's such a useful command..
The stuff in the HEAD can frequently be ignored if it contradicts something in the real header.. This is the thing that varies by browser..
Take a look at the HTTP specification.. it's all in there, and more..
Hope that helps!
Chris Beaumont
----- Original Message ----- From: "Lennart Regebro" <lennart@regebro.nu> To: "Andreas Jung" <andreas@zope.com>; <zope@zope.org> Sent: Thursday, February 14, 2002 11:12 Subject: Re: [Zope] Does Zope translate http-equiv statements?
From: "Andreas Jung" <andreas@zope.com>
What is a HTML header ? You know, the part between <HEAD> and </HEAD>... :-)
I assume you mean meta-tags ?!
I do, yes.
Zope does not care about http-equiv statements. Why should it ?
No reason at all, really. Some servers do and I'm trying to figure out wether it is IE6 or the w3.org P3P validator that has a bug, and in that case which bug it is. The P3P validator is happy with this statement:
<meta http-equiv="P3P" content="CP='CAO DSP COR LAW IND UNI COM NAV CURa ADMa DEVa OUR'">
IE6 does not like it, but they both like: <dtml-call "RESPONSE.setHeader('P3P','CP=' + _.chr(34) + 'CAO DSP COR LAW IND UNI COM NAV CURa ADMa DEVa OUR' + _.chr(34) )">
Now, as you see, there are two differences here. One is an http-equiv, and the other is that the single and double quotes are switched.
HTTP-equiv is only for the web client. In your case I would slap the guys from M$ for yet-another-non-compliant-implementation.
Cheers, Andreas
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
From: "Richard Barrett" <R.Barrett@ftel.co.uk>
Just to add my 2 pennyworth to the discussion: looking at the following URL http://www.w3.org/TR/REC-html40/struct/global.html#edef-META#edef-META, it says:
[...] "may", "could"...
Don't you just love standards :)
Yes. Especially when they actually standardize something. :-) "The good thing with standards are that there are so many to choose from." Anyway, if anybody is interested, the full monty is this: 1. Zope does not translate http-equiv meta tags. 2. The W3C P3P validator accepts P3P http-equiv meta tags. 3. IE6 does not accepts P3P http-equiv meta tags, nor should it, according to the the view of people on the w3c privacy list. 4. The W3C P3P validator accepts P3P tags with single quotes. 5. IE6 does not accepts P3P tags with single quotes, nor should it, according to the P3P standard. So, today I found two bugs in the W3C validator. These bugs have robbed me of at least 8 productive working hours. :-/
participants (4)
-
Andreas Jung -
Chris Beaumont -
Lennart Regebro -
Richard Barrett