You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2014/09/10 14:32:28 UTC

[jira] [Resolved] (HTTPCLIENT-1552) URI Encoding doesn't encode ':' in URI

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-1552.
-------------------------------------------
    Resolution: Invalid

{code:java}
String s = "/content/programid%3A%2F%2F1879048975~programid%3A%2F%2F1124073478/offers?catalogueId=1";
System.out.println(s);
System.out.println(URIUtils.rewriteURI(new URI(s)));
{code}

{noformat}
/content/programid%3A%2F%2F1879048975~programid%3A%2F%2F1124073478/offers?catalogueId=1
/content/programid%3A%2F%2F1879048975~programid%3A%2F%2F1124073478/offers?catalogueId=1
{noformat}

Oleg

> URI Encoding doesn't encode ':' in URI
> --------------------------------------
>
>                 Key: HTTPCLIENT-1552
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1552
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.3.3
>            Reporter: Yehudit
>            Priority: Critical
>              Labels: encoding, uri
>
> A client wants to send a URI that contains:
> /content/programid://1879048975~programid://1124073478/offers?catalogueId=1
> in it's path.
> Apache client doesn't encode/escape the :// part which we believe is allowed by the http spec.
> if we encode manually and use:
> /content/programid%3A%2F%2F1879048975~programid%3A%2F%2F1124073478/offers?catalogueId=1
> then apache client re-encodes the '%' which messes up the uri.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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