You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Jean-Philippe Pattus <jp...@sogitec.fr> on 2004/03/01 09:37:34 UTC

directory includes blank caracter

Hello the list,
my config is :
- server side : an apache server plus a module for WEBDAV
- client side : jakarta slide webdab client 2.0 beta1

my code is very simple :

			WebdavFile collectionDirectory = new WebdavFile(new 
HttpURL("http://ServerName/Toto/Directory with blank"));
			File files[] = collectionDirectory.listFiles();

the files list is not correct, the list contains all the files and 
subdirectories (this is ok), but also the root directory 
Directory%20with%20blank (this is ko ).

is my code correct ? why the file name is encoded? If you can something for 
me.
thanks.

regards, jp



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: directory includes blank caracter

Posted by Ingo Brunberg <ib...@fiz-chemie.de>.
> Jean-Philippe Pattus wrote:
> > Hello the list,
> > my config is :
> > - server side : an apache server plus a module for WEBDAV
> > - client side : jakarta slide webdab client 2.0 beta1
> > 
> > my code is very simple :
> > 
> > 			WebdavFile collectionDirectory = new WebdavFile(new 
> > HttpURL("http://ServerName/Toto/Directory with blank"));
> > 			File files[] = collectionDirectory.listFiles();
> 
> URLs never contain unescaped space characters.

That is correct. But HttpURL, when created this way, does the escaping
for you, so there's nothing wrong with this code. The question I am
asking is whether Jean-Philippe is really using 2.0beta1 or some older
code, because this bug should be fixed for some time now.

Ingo

> 
> > the files list is not correct, the list contains all the files and 
> > subdirectories (this is ok), but also the root directory 
> > Directory%20with%20blank (this is ko ).
> 
> This looks ok, although I'd prefer the server to reject the request 
> because of the illegal URI.
> 
> > is my code correct ? why the file name is encoded? If you can something for 
> > me.
> > thanks.
> 
> <href> elements in PROPFIND responses contain URIs, and URIs never ever 
> contain unescaped reserved (such as SP) or non-ASCII characters.
> 
> Julian
> 
> -- 
> <green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: directory includes blank caracter

Posted by Julian Reschke <ju...@gmx.de>.
Jean-Philippe Pattus wrote:
> Hello the list,
> my config is :
> - server side : an apache server plus a module for WEBDAV
> - client side : jakarta slide webdab client 2.0 beta1
> 
> my code is very simple :
> 
> 			WebdavFile collectionDirectory = new WebdavFile(new 
> HttpURL("http://ServerName/Toto/Directory with blank"));
> 			File files[] = collectionDirectory.listFiles();

URLs never contain unescaped space characters.

> the files list is not correct, the list contains all the files and 
> subdirectories (this is ok), but also the root directory 
> Directory%20with%20blank (this is ko ).

This looks ok, although I'd prefer the server to reject the request 
because of the illegal URI.

> is my code correct ? why the file name is encoded? If you can something for 
> me.
> thanks.

<href> elements in PROPFIND responses contain URIs, and URIs never ever 
contain unescaped reserved (such as SP) or non-ASCII characters.

Julian

-- 
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org