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 Dmitry Beransky <db...@dembel.org> on 2002/01/25 20:08:50 UTC

webdevclient & spaces in file names

Hi,

I've run into another problem using the webdav client library.  I'm 
transferring files generated by a third party program (ShowShifter).  These 
files may contain spaces in their names and when they do, webdav gags.  I'm 
not sure if the fault is with webdavclient, or HttpClient, or java.net.URL, 
but before I start digging through the code, I thought I'd asked to see if 
anyone has a workaround to this problem.

Here're some details:

I have to point to a webdave resource with a url (the url is being 
submitted via a web interface):

       sourceResource = new WebdavResource( new HttpURL( sourceUrl ) );

here's an example of what 'source' may look like:

     http://pvr/video/Tue1418%2022%2001%2002%2Essf

but, when I try to fetch that resource I get:
    java.io.FileNotFoundException: http://pvr/video/Tue1418 22 01 02.ssf

The logs on the server (IIS 5.0) say the request was for 
http://pvr/video/Tue1418+22+01+02.ssf

So somewhere inside WebDav CLient or HttpCLient something is incorrectly 
converting spaces to '+'.  My suspicion is that the conversion is done by 
URLEcoder.encode(), which, despite it's name, is a x-www-form-urlencoded 
encoder, and not a url encoder.  Whatever is calling URLEncoder shouldn't be.

Regards
Dmitry


---
Dmitry Beransky
Software Engineer

University of California, San Diego
Multimedia Interactive Learning Lab (http://mill.ucsd.edu)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>