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

HttpURLConnection can only redirect to http: URL's

XMLWordPrintable

    • b01
    • generic
    • generic, solaris_2.4, solaris_9
    • Not verified

      When HttpURLConnection gets a "Location:" header it redirects
      to that URL. That URL must be another http: connection.
      Any other URL (e.g. file:/tmp) will fail with a "file not found"
      error template in HotJava. The redirection is done for HotJava
      down in HttpURLConnection; it never actually knows that a redirect
      has occured.

      Redirecting to a non-http URL works in Netscape.

      This is reproducible with hotjava1.0m and JDK1.1.1E (fcs).

      Attached is a CGI script which does a simple redirection via:

      Location: file:/tmp

      It works in Netscape; fails with 'file not found' error in HotJava.

            djbrown David Brown (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: