[rfc][icedtea-web] fix for PR1465 - java.io.FileNotFoundException while trying to download a JAR file
Adam Domurad
adomurad at redhat.com
Tue Jun 4 13:08:55 PDT 2013
On 06/04/2013 04:06 PM, Adam Domurad wrote:
> On 06/04/2013 09:31 AM, Jiri Vanek wrote:
>> Although not nice, not even bad.
>>
>> tbh this was known issue, and when sad was pushing his patch we
>> decided to ignore %20 and + similarity under html encoding, and
>> difference under RFC2396.
>> Apearently, wrongly.
>>
>> J.
>
> I have done some research and I think I found a solution that should
> be pleasing. See the unit tests in the patch, too.
>
> Basically new URI(url) will check RFC2396 validity.
> See
> http://stackoverflow.com/questions/304806/encode-and-decode-rfc2396-urls
>
> This avoids the whole normalization mess if the URL is already valid.
> As long as we create URLs in a manner that ensures they are correct,
> this will be preserved.
> This should reduce the future chance of unintended icedtea-web quirks,
> too.
>
> Happy hacking,
> -Adam
There was a bit of noise in the diff, so just reassuring that
UrlUtils.normalizeUrl is intended to be untouched other than the line
'if (protocol == null || !shouldEncode || url.getPath() == null ||
isValidRFC2396Url(url)) {'
Happy hacking,
-Adam
More information about the distro-pkg-dev
mailing list