Re: http-urls style, trailing slash and webdav

Julian Reschke schrieb:
>
> Reto Bachmann-Gmür wrote:
>>
>> Julian Reschke schrieb:
>>> Reto Bachmann-Gmür wrote:
>>>>
>>>> ...
>>>>
>>>> However implementing support for webdav all the clients I tested at 
>>>> least occasionally requested a collection without trailing slash, 
>>>> even if was referenced with slash in the containing collection, 
>>>> this makes it impossible to have two differen resource at 
>>>> http://wymiwyg.org/knobot (a GET-dereferencable resource) and 
>>>> http://wymiwyg.org/knobot/ (a dav:collection). It seems that the 
>>>> expected behavior is  that an URL with removed trailing slash 
>>>> either causes the same server response or a redirect to the 
>>>> resource with trailing slash.
>>>
>>> Yes. So why don't you just make it one resource that is both a 
>>> DAV:collection and has GETtable content?
>> The problems I see are:
>> - Relative URIs in formats such as HTML or N3
>
> Wouldn't that be solved with Content-Location (not sure...).
>
>> - Search engines index twice (maybe not with proper Content-Location 
>> header)
>> - Ambiguity when comparing meta-information (such as bookmark files, 
>> or annotea annotations)
>>
>> Maybe a work around:
>> - On GET/POST/PUT requests with a slash at the end: redirect to the 
>> url without slash, except for "/"
>> - On PROPFIND/PROPATCH requests without slash at the end: deliver 
>> response for the resource with trailing slash iff this is a 
>> DAV:collection
>
> Why wouldn't you always want to point the client to the variant with 
> trailing slash?
According to rfc2518 only collection resources are referenced in the 
containing collection with a trailing slash. I guess some webdav clients 
would see only directories.

The other issue is users wanting to save resource to disk, testing with 
an image at <http://localhost:8585/slashatend/> :

- mozilla (1.07/kubuntu): "save page as" menu just doesn't work (no 
reaction), drag-drop, asks for filename
- wget (1.10): saves the image as index.html (sic!)
- konqueror: looks good (but fails with "cannot save animated images")
- amaya: "save as" proposes to save the image/gif to 
http://localhost:8585/slashatend/Overview.html, after pressing ok it 
asks to authenticate, on http://localhost:8585/slashatend/Overview.html 
there is now an html document with an image tag, and the document-url as 
its source attribute. Browsing the filesystem and specifying a file name 
leads to the status message "Document saved: /home/reto/temp/foo.gif", 
but I can't find the file.

cheers,
reto

Received on Thursday, 26 January 2006 17:23:24 UTC