W3C home > Mailing lists > Public > www-validator@w3.org > April 2003

Re: checklink: Usually the sign of a malformed URL that cannot be parsed by the server

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Wed, 16 Apr 2003 13:46:45 +0300 (EEST)
To: www-validator@w3.org
Message-ID: <Pine.GSO.4.50.0304161302100.18621-100000@korppi.cs.tut.fi>

On Wed, 16 Apr 2003, Martin RODOT wrote:

> trying to check :  www.mrit.com/Essais/test.php

So this relates to http://validator.w3.org/checklink rather than the
validator. It took me some time to realize this. It's nice to have a link
checker, but it's conceptually quite different from a validator.
Generally, validation should be carried out first. (Your test document is
invalid under any HTML DTD, since it lacks the required title element.) In
this case however, it's really the link URL that is the problem:

> I get an error : "Usually the sign of a malformed URL that cannot be parsed by the server."
>
> There is a "require" and relative paths, but AFAIK, there is no error  and the page can be displayed properly with the explorers I
> tried.

The href attribute value on the test page is
../../test.html
which does not comply with URL specifications, when the base address is
http://www.mrit.com/Essais/test.php. The relative URL
../test.html
would correspond to the absolute URL
http://www.mrit.com/test.html
but
../../test.html
does not correspond to anything, since it there is just one path segment
to be removed in the base address, and ../../ means removing two segments.

For an explanation of mapping relative URLs to absolute URLs, see
http://www.cs.tut.fi/~jkorpela/HTML3.2/3.5.html#relurl
for an informal discussion and
http://www.cs.tut.fi/~jkorpela/rfc/2396/full.html#5.2
for the formal rules.

Browsers apparently do error recovery and treat ../../test.html
effectively as ../test.html in this case. Or to put it in other
words, they start processing the relative URL and when faced with the
job of removing another segment, with nothing to remove, they stop
there and use the URL they've got so far. Lynx, for one, gives a warning
that probably tries to say this.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Wednesday, 16 April 2003 06:46:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:08 GMT