W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > January to March 1999

Re: href element, type of URI inside?

From: Greg Stein <gstein@lyra.org>
Date: Wed, 31 Mar 1999 17:27:25 -0800
Message-ID: <3702CB7D.3CF98BFA@lyra.org>
To: ccjason@us.ibm.com
CC: w3c-dist-auth@w3.org
The WebDAV spec, section X states:

HTTP 1.1 protocol spec (I.D. rev6, an update to RFC2068), section 3.2.1
states:

"URIs in HTTP can be represented in absolute form or relative to some
known base URI [11], depending upon the context of their use."

A response containing an <href> element definitely has a known base URI
(the resource that the PROPFIND was issued against). Therefore, a
relative URI should be acceptable.

Caveat: well, maybe it doesn't "definitely" have a known base since that
was not specified in the WebDAV spec, but it seemed obvious to me ;-)

ccjason@us.ibm.com wrote:
>...
> Which is recommended?
> 
>      /mypath
>  or
>    http://myhost/mypath
> 
> Are there situations where one is better than the other?    Are there
> situations where one or the other is required?

I'm biased of course :-), but I don't see a lot of problem with using
either the two. For a server writer, it is sometimes more difficult to
use the absolute form. This is because it can be hard to know what
absolute-URI was used to access the resource. Specifically, multiple
hostnames may be used to access the same resource (e.g. a bunch of
CNAMES or partially-qualified host names)

[ caveat: actually, this could simply be an artifact of server design,
rather than a difficulty derived from the protocol itself. ]

> Just to get the mind working...
> 
> <rhetorical>
> If a scheme and host are specified, must it point to the webdav enabled
> URI?  For example, if the main server is on port 80 and webdav access is
> only allowed on port 8080, then MUST the URI include 8080 if it also
> specifies the host and scheme?

Absolutely. The <href> must provide a URI that can be used, and that
actually contains the properties listed in the PROPFIND result.

Let's say you asked for http://myhost:8080/mypath and the result said
http://myhost/mypath. Now you attempt to issue a PROPPATCH against the
returned URI to correct a value that you found in there. Oops! Doesn't
work.

> Are there situations where a scheme or host other than that used for the
> current webdav connection might be appropriate?  ie...
>    shttp://myhost/mypath
>    http://otherhost/mypath
> might be appropriate?   Is this even allowed?  Or are these possibilities
> reserved for further extensions?

I would think that you could return any "direct reference" in the <href>
element, where that direct reference specifies the resource on which you
reported the properties.

> Does the presense/possibility of references/passthru affect the answers
> above?

Yup. IMO, any direct reference should be acceptable for reporting, since
they (technically) provide access to the properties reported in the
PROPFIND.

Cheers,
-g

--
Greg Stein, http://www.lyra.org/
Received on Wednesday, 31 March 1999 20:35:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:43:49 GMT