Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4670449
Votes 1
Synopsis RFE: DNS-related functions in PAC file support do not support foward DNS lookups
Category java_plugin:ocx
Reported Against 1.4 , 1.3.1_09
Release Fixed 1.3.1_11, 1.4.0_02(Bug ID:2053808) , 1.4.1(hopper-rc) (Bug ID:2053809)
State 10-Fix Delivered, request for enhancement
Priority: 1-Very High
Related Bugs 4669551 , 4703164
Submit Date 18-APR-2002
Description




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

FULL OPERATING SYSTEM VERSION :Windows NT Version 4.0


EXTRA RELEVANT SYSTEM CONFIGURATION :
IE 4, 5, and 6 affected

A DESCRIPTION OF THE PROBLEM :
The JPI implements the javascript functions isResolvable,
dnsResolve, and isInNet in order to support Proxy Auto-
configuration (.pac) files.  The JPI does not fully
implement these functions as they do not support forward
dns lookups ( name to IP ).  As we operate in a proxy
environment and have many machines both external and
internal that use a common domain name, we rely heavily on
these functions in order to send traffic direct for
internal sites and to the proxies for external traffic.

As the number of external IP address segments we have are
limited and are not changed very often, while new box names
can occur very frequently, we have implemented something
like the following.

Assuming an external address segment of
a.b.c.0/255.255.255.0 and a domain name "acme.com" that is
used for both external and internal machines:

function FindProxyForURL(url, host)
{
    if ( dnsDomainIs( host, "acme.com" ) )
    {
        if ( isInNet( host, "a.b.c.0", "255.255.255.0" ) )
            return "PROXY proxy:8080";
        else
            return "DIRECT"
    }
}

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.  Implement a PAC file similar to the one given
2.  Point 1.4 JPI to this new PAC file
3.  Try to access and external site by hostname.  As
isInNet will return false, the JPI will try to go direct.

EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected these functions to perform forward DNS lookups.
As this .pac file works for the thousands of browser
installations we have, I expected to be able to use the
same .pac file for the JPI.  This .pac file works for IE,
Netscape, and for the  customer  JVM.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
JPI reports that no class definition was found as the connection attempt failed.

This bug can be reproduced always.
(Review ID: 145122) 
======================================================================
Work Around
N/A
Evaluation
The fix of this bug depends on javascript callback to java and currently IE does not support this kinds of call.


  xxxxx@xxxxx   2002-04-18

Basically this bug can't be fixed since Java Plugin can't hook up the javascript engine of the browser to look up the IP address using DNS server. The way which browser accesses the IP address using the host name depends on the DNS service provided by the OS. So this is not a bug and we won't fix it. However, we need to document this in our docs.

  xxxxx@xxxxx   2002-04-19

I am reconsidering the possible fix for this bug.

  xxxxx@xxxxx   2002-04-23

After some investigation, there could be someway to do this. Basically FindProxyForURL function takes tow arguments, one is URL of the page, and the other is the host name of that URL. And my soultion to this problem is before executing that funtion, we add one more parameter to that function which is the IP address of that host. And we need to reimplement all the functions currently we have. 
  xxxxx@xxxxx   2002-04-23

It is too complex to implenent all this noting that the pac file could be very complex. Mark as "Won't fix"

  xxxxx@xxxxx   2002-04-23

It is not a bug, it is a RFE. Change the synopsis to RFE.

  xxxxx@xxxxx   2002-05-06

The customer needs this fix at the end of this year. So I would think it is too late to make it in the next release.

  xxxxx@xxxxx   2002-05-07

The fix is ready for review. The webrev is at http://javaweb.sfbay/~xl116366/webrev/4670449.html

  xxxxx@xxxxx   2002-05-13

A fix has been backported from Mantis and integrated into the 1.4.0_02 integration workspace. I'm attaching webrev's for both Mantis and 1.4.0_02 verions.
webrev_4670449_14002.tar : webrev 1.4.0_02 version
webrev_4670449_142.tar : webrev mantis version
  xxxxx@xxxxx   2002-07-12
Comments
  
  Include a link with my name & email   

Submitted On 18-AUG-2002
Howzat
How soon could I get the fix?  PLease help..........


Submitted On 18-AUG-2002
Howzat
Could someone sent me the fix please?  I need it for global 
enterprise deployment of J2RE1.4 for 85,000 users.  



PLEASE NOTE: JDK6 is formerly known as Project Mustang