You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Paco Avila <mo...@gmail.com> on 2008/07/29 09:44:06 UTC

Submit file with forbidden chars in name to WebDAV

There are some forbidden chars in node names (:, [, ], *, \, ", |) How deal
WebDAV with these files? Actually server response is "500 Internal Server
Error" but can I escape the document names (and folder) to clean these
forbidden chars and get a good name? The real question is: where should I
call this escaping method?

Re: Submit file with forbidden chars in name to WebDAV

Posted by Paco Avila <mo...@gmail.com>.
Yes and not. I know that the problem is related to JCR and not directly to
WebDAV but my problem is when I use JCR across WebDAV. The problem is not
the WebDAV protocol is the WebDAV-JCR bridge.

I will try yor solution. Thanks!

On Tue, Jul 29, 2008 at 11:12 AM, Angela Schreiber <an...@day.com> wrote:

> Paco Avila wrote:
>
>> There are some forbidden chars in node names (:, [, ], *, \, ", |) How
>> deal
>> WebDAV with these files? Actually server response is "500 Internal Server
>> Error" but can I escape the document names (and folder) to clean these
>> forbidden chars and get a good name? The real question is: where should I
>> call this escaping method?
>>
>
> first of all: the problem is cause by JCR which has
> some limiations regarding names. so far it's not related
> to WebDAV.
>
> if you are using the simple webdav server, i would
> suggest that you create your own DavResourceLocator factory
> that adds escaping/unescaping of the chars invalid in JCR
> names upon conversion from
>
> href -> repositoryPath and
> repositoryPath -> href.
>
> regards
> angela
>
>
>
>
>

Re: Submit file with forbidden chars in name to WebDAV

Posted by Angela Schreiber <an...@day.com>.
Paco Avila wrote:
> [...] Text.escapeIllegalJcrChars(name)

that one was the right guess ;)

> WebDAV bridge should perform this escaping, I think...

as i said: it's the resource-locator that does that.
see JCR-184 for the rationales why this is not implemented
by default.

angela

Re: Submit file with forbidden chars in name to WebDAV

Posted by Paco Avila <mo...@gmail.com>.
Yes, the invalid names should be escaped using ISO9075.encode(name) (or
perhaps Text.escapeIllegalJcrChars(name) or Text.escape(name) I'm not sure).
WebDAV bridge should perform this escaping, I think...

On Tue, Jul 29, 2008 at 12:14 PM, Florian Holeczek <fl...@holeczek.de>wrote:

> >> There are some forbidden chars in node names (:, [, ], *, \, ", |) How
> deal
> >> WebDAV with these files? Actually server response is "500 Internal
> Server
> >> Error" but can I escape the document names (and folder) to clean these
> >> forbidden chars and get a good name? The real question is: where should
> I
> >> call this escaping method?
>
> > first of all: the problem is cause by JCR which has
> > some limiations regarding names. so far it's not related
> > to WebDAV.
>
> I remember that the JCR specs contain a mapping for these characters.
> Isn't this implemented in Jackrabbit?
>
> Regards,
>  Florian
>

Re: Submit file with forbidden chars in name to WebDAV

Posted by Florian Holeczek <fl...@holeczek.de>.
>> There are some forbidden chars in node names (:, [, ], *, \, ", |) How deal
>> WebDAV with these files? Actually server response is "500 Internal Server
>> Error" but can I escape the document names (and folder) to clean these
>> forbidden chars and get a good name? The real question is: where should I
>> call this escaping method?

> first of all: the problem is cause by JCR which has
> some limiations regarding names. so far it's not related
> to WebDAV.

I remember that the JCR specs contain a mapping for these characters.
Isn't this implemented in Jackrabbit?

Regards,
 Florian

Re: Submit file with forbidden chars in name to WebDAV

Posted by Angela Schreiber <an...@day.com>.
Paco Avila wrote:
> There are some forbidden chars in node names (:, [, ], *, \, ", |) How deal
> WebDAV with these files? Actually server response is "500 Internal Server
> Error" but can I escape the document names (and folder) to clean these
> forbidden chars and get a good name? The real question is: where should I
> call this escaping method?

first of all: the problem is cause by JCR which has
some limiations regarding names. so far it's not related
to WebDAV.

if you are using the simple webdav server, i would
suggest that you create your own DavResourceLocator factory
that adds escaping/unescaping of the chars invalid in JCR
names upon conversion from

href -> repositoryPath and
repositoryPath -> href.

regards
angela