[ https://issues.apache.org/jira/browse/HTTPASYNC-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13935531#comment-13935531 ]
Sebb commented on HTTPASYNC-72: ------------------------------- The java.net.URI class has multi-arg constructors that do encoding: http://docs.oracle.com/javase/7/docs/api/java/net/URI.html#decode - see the bullet point beginning "* The multi-argument constructors" You should be able to parse the string using the URL class (which does almost no validation), and then pick out the parts to pass to the URI class, e.g. URI uri = new URI(url.getProtocol(), url.getUserInfo(), etc... > Connecting to certain URLs causes a malformedInputException > ------------------------------------------------------------ > > Key: HTTPASYNC-72 > URL: https://issues.apache.org/jira/browse/HTTPASYNC-72 > Project: HttpComponents HttpAsyncClient > Issue Type: Bug > Affects Versions: 4.0-beta4 > Environment: Ubuntu 13.10 > Reporter: Rainer Hind > Priority: Minor > Attachments: Bug.java > > > When attempting to get the future object after executing a request, a > malformedInputException is thrown. I believe this is due to non-ascii > characters in the location header (since the page in the example code is a > Thai website, with Thai characters in the URL). > When connecting to the problem site, there is no issue. However, when > connecting to a site which redirects to the problem site, the exception is > thrown. > See the attached code for an example. -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org