ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 20893] New: - VAJRemoteUtil does not encode/decode spaces in path names
Date Wed, 18 Jun 2003 22:04:30 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20893>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20893

VAJRemoteUtil does not encode/decode spaces in path names

           Summary: VAJRemoteUtil does not encode/decode spaces in path
                    names
           Product: Ant
           Version: 1.5.3
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: kai.nacke@redstar.de


I am using Ant to export source from VisualAge 4.0 into the filesystem.
My destination directory has spaces in its - and that doesn't work because
the destination directory is not encoded.

Sample build.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="bug" default="export">
  <target name="export">
    <vajexport destdir="C:\TEMP\Path With Space" exportSources="yes"
remote="localhost:1900">
      <include name="Servlet API Classes/**"/>
    </vajexport>
  </target>
</project>

If I execute Ant with the -debug switch, I see the following URL:

[vajexport] Request: http://localhost:1900/servlet/vajexport?deb=false&owr=true&
dir=C:/TEMP/Path With Space&cls=false&res=true&src=true&dex=true&include=Servlet
+API+Classes/**

Notice the spaces after dir=C:/TEMP/Path!

Solution:
Change VAJRemoteUtil to use java.net.URLEncoder.encode() and change
VAJExportServlet and VAJImportServlet to use java.net.URLDecoder.decode().

My Environment:
Ant: Apache Ant version 1.5.3 compiled on April 16 2003
JDK: java version "1.4.1_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_03-b02)
Java HotSpot(TM) Client VM (build 1.4.1_03-b02, mixed mode)
OS: Windows 2000
Other Tools: VisualAge for Java 4.0, Fix 2

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message