hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yossi Tamari <yo...@yossi.at>
Subject Invalid redirect URI
Date Mon, 04 Apr 2016 15:20:02 GMT

I know this is an old subject, and related to the closed tickets
https://issues.apache.org/jira/browse/HTTPCLIENT-1204 and
https://issues.apache.org/jira/browse/HTTPCLIENT-1392, but it seems to be a
different case, and I’m not even sure it is not a bug.

If you go to some sites with an encoded UTF-8 URL, and get a redirect that
contains the same encoded value, DefaultRedirectStrategy throws an

For example:

Go to
(which is the encode version of https://vimeo.com/api/v2/курочкина/info.xml).
You get a redirect to
This seems like a valid header/redirect to me, since it is an ASCII string,
with some encoded URL in it.
However, response.getFirstHeader("location") reads this as
https://vimeo.com/api/v2/Курочкина/info.xml, and then the
URIParser throws "java.net.URISyntaxException: Illegal character in path at
index 26", which leads the DefaultRedirectStrategy  to throw a
Invalid redirect URI".

Is this really a bug in the web-site (if so, it is pretty common) and not
in HC?
Any idea how I can get the correct URL?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message