ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Reed <>
Subject Re: spaces in url for get task (2)
Date Wed, 05 Sep 2001 16:07:15 GMT
Bhadra, Jatin [] wrote:
> I would had assumed that in ant all the spaces will be replaced
> by + or %20.
> Has any one come across this problem before. 
> Thanks in advance
> Jatin
> PS: I known that I can replace the space in my request with +
> or %20 but since the parameter that I pass in is a variable I
> have no control over it.

According to the RFC (1738), spaces in URLs are supposed to be
ignored completely; if a space needs to be passed in a URL it
should always be encoded:

   Characters can be unsafe for a number of reasons.  The space
   character is unsafe because significant spaces may disappear
   and insignificant spaces may be introduced when URLs are
   transcribed or typeset or subjected to the treatment of
   word-processing programs.


   In some cases, extra whitespace (spaces, linebreaks, tabs,
   etc.) may need to be added to break long URLs across lines.
   The whitespace should be ignored when extracting the URL.

Is there no way to fix the non-conforming app that's passing
spaces in URLs?

Ben Reed a.k.a. Ranger Rick ( /
The devil's in the broad, sweeping generalizations.

View raw message