URI.create(String) and URI(String) both break if there's anything in the string
that *should* be percent-encoded, but isn't.
URI(String, String, String) and URI(String, String, String, String, String), as
well as the other less-likely constructors will break if the components *are*
encoded (because it will %-encode any '%' character that it finds).
Just brilliant. The code that knows how to break a string into components won't
create a URI if it isn't encoded, so you can't use it to break the string into
components, which can then be safely passed to the multi-argument constructors.
Solution: use the regex from RFC3986 to break the string down, and then decode
each component and hand them all to a multi-argument constructor. Replace calls
to URI(String) or URI.create(String) with StringToURIParser.parse(String).
Original issue reported on code.google.com by aale...@gmail.com on 30 Aug 2013 at 7:18
Original issue reported on code.google.com by
aale...@gmail.com
on 30 Aug 2013 at 7:18