Re: link test suite

On Feb 11, 2008, at 09:32 , Ville Skyttä wrote:
> On Monday 11 February 2008, olivier Thereaux wrote:
>> indeed, maybe base href="" should not be checked
>> directly.
>
> I think there are a few more of the kind, like codebase for applet  
> and object.

OK. I need to find a way to clearly mark some of those tests as  
optional. Or maybe drop them altogether.

> I just educated myself over the weekend and found out how terribly
> convenient $response->base() is (see HTTP::Response documentation) and
> thought I'd dump our <base> handling altogether in favour of it  
> later in
> checklink, dunno if the info where our base came from could be  
> sanely figured
> out if it was used.  But I agree the info would be useful.

Interesting. http://search.cpan.org/~gaas/libwww-perl-5.808/lib/HTTP/Response.pm#$r-%3Ebase 
  is indeed all we need. Pity it doesn't record which source has been  
used as authoritative.

I guess base href and content-location are not so frequently used that  
we'd want to make our code mort complicated for it. I'd support using   
$response->base() if you think it makes sense.


> A bit off topic: Regarding codebase for applets and objects, I  
> implemented
> taking it into account in checklink in the weekend.  However I find  
> the
> docs/implementations for it somewhat mismatched; let's say for  
> document at
> http://.../foo/baz.html, <object codebase="bar" data="quux"> (note no
> trailing slash in "bar") should IMO result in the whole URL to the  
> object's
> data be resolved to http://.../foo/quux because codebase is a "base  
> URI":
>
> 1) bar relative to http://.../foo/baz.html: http://.../foo/bar
> 2) quux relative to http://.../foo/bar: http://.../foo/quux
>
> However, browsers seem to always treat codebase as a directory (ie.  
> as if it
> had a trailing slash), resulting in http://.../foo/bar/quux .   
> Thoughts?


My understanding is that the base URI should be taken as is, not  
necessarily as a directory. So your interpretation appears to be  
correct. However, it's fairly well known that desktop browsers are  
broken wrt Content-Location, so I wouldn't be surprised if they were  
broken for base URI calculation, too.

See e.g: http://www.nabble.com/Content-Location-as-Base-URI-td14247512.html

-- 
olivier

Received on Thursday, 21 February 2008 07:34:13 UTC