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

Regression: Class.getResourceAsStream authentication failure in 1.3.0_02 plugin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.3.0
    • deploy
    • x86
    • windows_nt



      Name: boT120536 Date: 03/14/2001


      Java(TM) Plug-in: Version 1.3.0_02
      Using JRE version 1.3.0_02 Java HotSpot(TM) Client VM

      Resubmission of review ID 112943 for 1.3.0_02
      This works with 1.3 fcs and earlier.

      Using plugin 1.3.0_02, an applet is loaded from URL with authentication, then
      calls Class.getResourceAsStream() to load a file from the web server. The plugin
      authentication window is popped, but even though a correct userid and password
      are entered, the method returns null.

      This works with 1.3 fcs and earlier.

      I was using Apache with basic authentication. The access log shows
      10.16.10.95 - - [07/Mar/2001:10:38:53 +0000] "GET /wui4/Test.properties HTTP/1.1 " 401 484

      Test.java:
      import java.applet.*;
      import java.io.*;

      public class Test extends Applet
      {
      public void start()
      {
      InputStream is = getClass().getResourceAsStream( "Test.properties" );
      BufferedReader br = new BufferedReader( new InputStreamReader(is ) );
      try
      {
      System.out.println( br.readLine() );
      }
      catch( IOException ioe )
      {
      ioe.printStackTrace();
      }
      }
      }

      test.html (for Netscape 4):
      <HTML>
      <BODY>
      <EMBED type="application/x-java-applet;version=1.2" width="400" height="90"
      align="baseline" code="Test.class">
      </EMBED>
      </BODY>
      </HTML>

      Test.properties
      (empty)
      (Review ID: 118283)
      ======================================================================

            stanleyh Stanley Ho (Inactive)
            bonealsunw Bret O'neal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: