Closed Bug 452098 Opened 16 years ago Closed 14 years ago

Using URLConnection in JAVA Applet throws Socket SecurityException on so called header domains

Categories

(Firefox :: Security, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: support, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16

Using URLConnection in JAVA Applet throws Socket SecurityException on so called header domains, (multiple domain with the same IP but different header).

The Applet should read files on the same domain, where the applet was downloaded.

The Error occurs at least on Windows, Linux and MAC Systems on the second and next domain request as soon the URLconnections opens.

Example: 
After System Browser start visit the first header domain: 
www.firstdon.com , the applet works just fine

trying to visit the next domain with same IP but different header as the first one 
www.nextdom.com

trows the Exception.

If after fresh PC start the www.nextdom.com will be visited first, then the exception will thrown and the www.firstdon.com which will be opened as second.

It seems like the Browser does not recognize the header domains and memorize the IP from the first connection.

Here the important part of the code:

URL url = new URL(“http://www.firstdon.com/index.html”) // the path is just a example
URLConnection uCon = url.openConnection();
uCon.setUseCaches(false);
InputStream inSt = uCon.getInputStream();

By the way, the MSIE Version 5.xx and higher works just perfect even with MS VM or SUN JAVA.

A Old Days BUG
Starting Applet which requires URLConnection and InputStream takes a really long time. Ths JAVA Console shows some kind of loop, to get the BasicPermission.
This is an old days BUG coming form Netscape 4.0 Version and carrying it even to the newest FireFox 3.0. It will be nice to get finally a rid of this, because applets running in MSIE starting much faster.

Here is a Example URL:
http://www.conproserv.de/applet_test.htm  

Please try it to see the BUGs in action.
 


Reproducible: Always

Steps to Reproduce:
See Details and try http://www.conproserv.de/applet_test.htm
Actual Results:  
SecurityException

Expected Results:  
No Problems
Resolving unconfirmed bugs older than a year with no activity as INCOMPLETE.  Please reopen or file a new bug if you can still reproduce the bug.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.