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

DNS-related functions in PAC file support do not support forward DNS lookups

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P1 P1
    • None
    • 1.4.0
    • deploy
    • None
    • x86
    • windows_nt

      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)

      OS Version :Windows NT Version 4.0
      Relevant IE 4, 5, and 6 affected

      The JPI implements the javascript functions isResolavable,
      dnsResolve, and isInNet in order to support Proxy Auto-
      configuration (.pac) files. The JPI does not fully
      implement these functions as the do not support forward
      dns lookups (name to IP). As we operate in a proxy
      enviroment 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 frenquently, we have implemented somthing
      like the following.

      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 acutal behavior:
      Expected these functions to perform forward DNS lookups.
      As this .pac file works for the thousands of browser
      installations customer has, expected to be able to use the
      same .pac file for the JPI. This .pac file works for IE,
      Netscape, and for the Microsoft JVM.

      Error Messages / stack traces that occur:
      JPI reports that no class definition was found as the connection
      failed.

      This bug can be reporduced alwasy.

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: