You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Carsten Ziegeler <cz...@apache.org> on 2007/10/19 15:52:18 UTC

Re: microsling static files + WebDAV

Tobias Bocanegra wrote:
>>> I do not think, that this is a good idea. It involves magic and leaves
>>> the microsling context in a way we cannot and most probably will not
>>> support in Sling and thus creates an incompatibility.
>>>
>>> Rather I would suggest to implement a SpoolServlet (extends
>>> SlingSafeMethodsServlet) which handles nt:file requests
>>> (MicroSlingServlet.addServlet("nt:file", new SpoolServlet()) and just
>>> pumps out the nt:file (or the Property value to which the
>>> Node.getPrimaryItem() trail leads).
>> i agree with felix that having a spool servlet is a better option.
>> nevertheless, i would provide a webdav servlet with the default setup.
>> so that users can easily upload/manager their static content in the
>> repository.
> 
> i rethought about this. the current webdav servlet in jackrabbit is
> pretty cool and feature complete. especially for GET requests it
> suports etags, if-last-modified-since, etc. and it would silly to
> reimplement this again.
> 
> furthermore, i think for the other methods (PUT, DELETE, MKCOL) etc
> the webdav servlet provides the good defaults. so i suggest to drop
> the StreamServlet idea, and map all exact-match resources per default
> to the webdav servlet.
> 
Perhaps I'm thinking too complicated here, but does this always work?
What about if I have
/content/test
/content/test.html
in my repository and try to get /content/test.html ?

This will be forwarded to the webdav servlet and I don't have any chance
to get the html view of /content/test.

Carsten

-- 
Carsten Ziegeler
cziegeler@apache.org

Re: microsling static files + WebDAV

Posted by Felix Meschberger <fm...@gmail.com>.
Am Freitag, den 19.10.2007, 15:52 +0200 schrieb Carsten Ziegeler:
> Perhaps I'm thinking too complicated here, but does this always work?
> What about if I have
> /content/test
> /content/test.html
> in my repository and try to get /content/test.html ?
> 
> This will be forwarded to the webdav servlet and I don't have any chance
> to get the html view of /content/test.

This is a fundamental problem of resource resolution in Sling and
microsling and has nothing to do with whether we use WebDAV or not....

But of course you can access the html view of /content/test
through /content/test.htm ... And yes, I do not like this either, but I
think such collisions cannot be prevented from happening unless we
require that after resolving the content we must have an extension in
the request info. But this is IMHO not a good idea...

Regards
Felix


Re: microsling static files + WebDAV

Posted by Felix Meschberger <fm...@gmail.com>.
Yes, I always liked the sites where the user is thrown an MSSql
Exception in his face ... :-)

Regards
Felix

Am Freitag, den 19.10.2007, 15:58 +0200 schrieb Tobias Bocanegra:
> > Perhaps I'm thinking too complicated here, but does this always work?
> > What about if I have
> > /content/test
> > /content/test.html
> > in my repository and try to get /content/test.html ?
> >
> > This will be forwarded to the webdav servlet and I don't have any chance
> > to get the html view of /content/test.
> 
> right. that's why you won't have a test.html :-)
> regards, toby
> 
> ps: this also forces people of building sites that have links with
> proper extensions (since /conten/test would point to a webdav
> collection and not 'render' the content) which is a good side effect,
> i think.
> 


Re: microsling static files + WebDAV

Posted by Tobias Bocanegra <to...@day.com>.
> Perhaps I'm thinking too complicated here, but does this always work?
> What about if I have
> /content/test
> /content/test.html
> in my repository and try to get /content/test.html ?
>
> This will be forwarded to the webdav servlet and I don't have any chance
> to get the html view of /content/test.

right. that's why you won't have a test.html :-)
regards, toby

ps: this also forces people of building sites that have links with
proper extensions (since /conten/test would point to a webdav
collection and not 'render' the content) which is a good side effect,
i think.

-- 
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---