W3C home > Mailing lists > Public > www-webdav-dasl@w3.org > October to December 2003

Format of DAV:get* properties

From: Julian Reschke <julian.reschke@gmx.de>
Date: Tue, 25 Nov 2003 12:18:15 +0100
Message-ID: <3FC33A77.2050602@gmx.de>
To: "'www-webdav-dasl@w3.org'" <www-webdav-dasl@w3.org>, w3c-dist-auth@w3c.org


I was just trying to come up with a DAV:basicsearch query that would 
match on the DAV:getcontenttype property (instead of making assumptions 
about file names).

However, a combination of

- complex media type syntax 
- HTTP white space handling in headers and
- deficiencies in the DAV:like operator

makes this *really* hard. To illustrate the problem, all of the 
following are legal values for the HTTP content-type header for a 
"text/plain" resource:

1) "text/plain"

2) "text/plain; charset=UTF-8"

3) "text/plain ; charset=UTF-8"

4) "text/plain;\tcharset=UTF-8"

5) "text/plain\r\n\t;charset=UTF8"

(where \r, \n and \t are CR, LF and HT).

If we add linear white space at the start of the attribute value, things 
get even more complicated.

One way to approach this issue is to find out whether existing DAV 
servers indeed use all these variants, or whether in practice only 
single SPs appear as whitespace (which would make sense in 
DAV:getcontenttype). In that case, we'd only need to consider variants 

Alternatively, the SEARCH spec could state that matching on DAV:get* 
headers occurs after whitespace normalization.

In both cases, a match for "text/plain" could be expressed as:

(DAV:getcontenttype LIKE "text/plain") OR (DAV:getcontenttype LIKE 
"text/plain %") OR (DAV:getcontenttype LIKE "text/plain;%")

This is still ugly, but if we add that as example to the spec, servers 
may be able to optimize this case internally.

An alternative would be to add a specific operator that specializes on 
matching media types minus parameters, such as


where both child elements would be optional and probably use LIKE syntax 
(in caseless mode).

Feedback appreciated,


<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760
Received on Tuesday, 25 November 2003 06:18:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:04:13 UTC