21606 – java.net.URI fails to decode lowercase hex codes

Bug 21606 - java.net.URI fails to decode lowercase hex codes
Summary: java.net.URI fails to decode lowercase hex codes
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.1
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
Reported: 2005年05月16日 11:58 UTC by Brion Vibber
Modified: 2005年05月16日 20:39 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2005年05月16日 20:10:50


Attachments
Test case (237 bytes, text/plain)
2005年05月16日 12:00 UTC, Brion Vibber
Details
View All Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this bug.
Description Brion Vibber 2005年05月16日 11:58:23 UTC
URIs may contain special hexadecimal byte codes in the format %HH where H is a
hexadecimal digit, either upper or lowercase. (RFC 2396 2.4.1)
When given a string containing lowercase hex codes such as %2c, the URI
constructor throws a URISyntaxException.
Steps to reproduce:
1. new URI("/a%2cb")
Actual results:
A URISyntaxException is thrown.
Expected results:
A happy, usable URI object. This works as expected on Sun's JDK 1.5.0.
Additional information:
GCC 4.0 compiled from source release on an Ubuntu Linux 5.04 "Hoary" system.
Comment 1 Brion Vibber 2005年05月16日 12:00:19 UTC
Created attachment 8899 [details] 
Test case
$ javac UriBugDemo.java && java UriBugDemo
ok: /a,b
ok: /a%2C,b
ok: /a%2c,b
$ gcj-4.0 -o UriBugDemo --main=UriBugDemo UriBugDemo.java && ./UriBugDemo
ok: /a,b
ok: /a%2C,b
broke! /a%2c,b
Comment 2 Tom Tromey 2005年05月16日 20:10:50 UTC
I'm testing a patch.
Comment 3 GCC Commits 2005年05月16日 20:27:53 UTC
Subject: Bug 21606
CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tromey@gcc.gnu.org	2005年05月16日 20:27:48
Modified files:
	libjava : ChangeLog 
	libjava/java/net: URI.java 
Log message:
	PR libgcj/21606:
	* java/net/URI.java (unquote): Handle lower-case letters as well.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.3615&r2=1.3616
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/net/URI.java.diff?cvsroot=gcc&r1=1.10&r2=1.11
Comment 4 GCC Commits 2005年05月16日 20:35:32 UTC
Subject: Bug 21606
CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	tromey@gcc.gnu.org	2005年05月16日 20:35:23
Modified files:
	libjava : ChangeLog 
	libjava/java/net: URI.java 
Log message:
	PR libgcj/21606:
	* java/net/URI.java (unquote): Handle lower-case letters as well.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.3391267&r2=1.3391268
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/net/URI.java.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.9&r2=1.9.6.1
Comment 5 Tom Tromey 2005年05月16日 20:39:47 UTC
I've checked in the fix.
Thanks for the simple test case.


AltStyle によって変換されたページ (->オリジナル) /