W3C home > Mailing lists > Public > public-qa-dev@w3.org > September 2004

Checking HTTP Headers

From: Nick Kew <nick@webthing.com>
Date: Sun, 5 Sep 2004 17:58:07 +0100 (BST)
To: public-qa-dev@w3.org
Message-ID: <Pine.LNX.4.53.0409051707280.1107@hugin.webthing.com>

As discussed in the light of
here are some thoughts on HTTP headers.  Dealing with all of these
will bring validator ahead of where Valet currently stands:-)

(0) Redirects

We should report any HTTP redirections.

(1) Content-Type

We already check content-type to determine whether to validate
a document.  We could also report when we determine the charset
from the HTTP header, saving potential confusion when someone
thinks they've set it in the document.

More generally, we should report exactly where we get the charset from
  * from HTTP headers
  * from XML rules (BOM or xmldecl)
  * from HTML rules (<meta> hack)

We could check all three, and warn if a conflict is found.

(2) Content-Length

We should warn if a malformed or zero content-length is encountered,
or if the content-length differs from the length of the document

(3) Content-Location

If the content-location is set and differs from what we requested
(after redirections, if applicable), then report it.

(4) Vary

If there is a Vary header, we should warn that the document is marked
as negotiated:

This document is negotiated and may vary according to browser preferences
(such as the reader's language).  The response indicated the following
values of the negotiated headers:
  Content-Language: en
  Content-Type: text/html;charset=iso-8859-1

(5) Last-Modified

We might consider reporting Last-Modified headers.  This might possibly
be of use to users who are struggling with their publishing software.

(6) Proxy headers

It might be of interest if a document has come through a proxy,
particularly a content-transforming or cacheing one.  We should
report if there's a "Via" response header, and in that case list
any Warning headers recieved.

Question: should we stop proxies transforming documents to be validated,
by setting "Cache-control: no-transform" in the validator's Request

Nick Kew
Received on Sunday, 5 September 2004 16:58:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:54:46 UTC