Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6274990

REGRESSION: URLConnection.connect() throws Exception with non UTF-8 char

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 6
    • 5.0, 6
    • core-libs
    • beta
    • generic, x86, itanium
    • generic, linux

    Backports

      Description

        FULL PRODUCT VERSION :
        java version "1.5.0_03"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
        Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)

        java version "1.5.0_03"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
        Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)

        ADDITIONAL OS VERSION INFORMATION :
        Linux ulysses 2.2.19pre17 #1 Tue Mar 13 22:37:59 EST 2001 i586 unknown
        Microsoft Windows XP [Version 5.1.2600]


        A DESCRIPTION OF THE PROBLEM :
        The directory name part of URL is the one that "Day" of the Chinese character was shown by the ShiftJIS character-code.

        class Bug {
            public static void main(String[] args) throws Exception {
                java.net.URL url = new java.net.URL("http://www.example.com/%93%fa/");
                java.net.URLConnection uc = url.openConnection();
                uc.connect();
            }
        }

        results in:
        Exception in thread "main" java.lang.IllegalArgumentException
                at sun.net.www.ParseUtil.decode(ParseUtil.java:179)
                at sun.net.www.ParseUtil.toURI(ParseUtil.java:253)
                at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
        ction.java:738)
                at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
        .java:669)
                at Bug.main(Bug.java:5)


        REPRODUCIBILITY :
        This bug can be reproduced always.

        Release Regression From : 1.4.2
        The above release value was the last known release where this
        bug was known to work. Since then there has been a regression.
        ###@###.### 2005-05-24 03:39:16 GMT

        Attachments

          Issue Links

            Activity

              People

                yuwangsunw Yujiang Wang (Inactive)
                gmanwanisunw Girish Manwani (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: