Re: W3 validator breaks W3 link checker!

* <rowe@excc.ex.ac.uk> [2001-03-22 21:02+0000]
> Thanks for making the on-linevalidator available, our 'standard'
> template includes a discrete link to http://validator.w3.org/check/referer.
> 
> But when I manually run checklink on such a page the validator sends
> back a redirect to http://validator.w3.org/ (presumably because it
> can't tell which page the request comes from) which checklink then
> complains about!

Hmmm... well, the link checker does not really complain, it just says
that it found a permanent redirect and that the link _should_ be
updated, which is true considering what the Validator returns.

> Could the validator check the user agent for W3C-checklink and if so
> just return something harmless?

This is because the link checker does not send a referer header, which
is in the to-do list[2].

Since there is no Referer HTTP header, the Validator doesn't know what
to validate, and redirects the client to the Validator main page.

The HTTP/1.1 specification reads about 301[3] status codes:

   The requested resource has been assigned a new permanent URI and any
   future references to this resource SHOULD use one of the returned
   URIs.

So, a permanent redirect (301) is not the right code to use here.
I would either:
- return a 200 explaining that because the client did not send a
  Referer header, the original page could not be checked, and having a
  link to the Validator home page.
- return a 302 (Found) or a 303 (See Other) to redirect the client to
  the home page.

Gerald, I will let you decide what you think is best.

Basically, I need to add referer support to the link checker and this
redirect feature should be modified.

  1. http://validator.w3.org/check/referer
  2. http://www.w3.org/2000/07/checklink#what
  3. http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2
-- 
Hugo Haas - W3C
mailto:hugo@w3.org - http://www.w3.org/People/Hugo/ - tel:+1-617-452-2092

Received on Friday, 23 March 2001 07:19:50 UTC