commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kyle R . Burton" <>
Subject Re: [httpclient] double encoding of %
Date Tue, 16 Jul 2002 19:02:01 GMT
> double encoding of URLs
> This bug was marked as invalid. But I believe that person doesn't really
> understand the problem. The issue is you have to be able to copy a URL from
> IE's address bar, put it in httpclient and it should just work. However,
> when the path has space in it, IE will show %20 in the address bar and
> httpclient will encode the % again. Please think hard about it before you
> really decide it's invalid. My suggestion is that % should never be escaped.
> If the user really wants a literal %, he can encode it himself.

I don't know what the resolution will be on this, but for the time-being
you could decode the URL before cutting &pasting it into httpclient. 
There is even a URIUtil class that can do the decoding for you:

  import org.apache.commons.httpclient.URIUtil;


    String encodedUrl = "http://localhost/?this=that%20and+the+other+thing";
    String decodedUrl = URIUtil.decode( encodedUrl );


Kyle R. Burton


Wisdom and Compassion are inseparable.
        -- Christmas Humphreys                  

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message