Jetty
  1. Jetty
  2. JETTY-259

SystemRoot evnironment not set under CGI

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.1.2rc1
    • Fix Version/s: 6.1.6rc0, 6.1.6rc1, 6.1.6
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows (Tested on Win2003 Standard Edition)
    • Number of attachments :
      2

      Description

      Currently Jetty's (6.1.2rc1) CGI servlet does not appear to set the SystemRoot variable when running on Windows. This causes some odd problems, including what appear to be DNS errors.

      For example, the following script, when run under the current CGI environement...

      -------------
      #!/C:\Perl\bin\perl.exe
      print `ping -n 1 www.funnelback.com`;
      -------------

      Will produce the message...

      -------------
      Ping request could not find host www.funnelback.com. Please check the name and try again.
      -------------

      Whereas

      -------------
      #!/C:\Perl\bin\perl.exe
      print `set SystemRoot=C:
      WINDOWS&& ping -n 1 www.funnelback.com`;
      -------------

      Will correctly produce ping output...

      -------------
      Pinging funnelback.com [64.72.112.53] with 32 bytes of data:

      Reply from 64.72.112.53: bytes=32 time=216ms TTL=128

      Ping statistics for 64.72.112.53:
      Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
      Approximate round trip times in milli-seconds:
      Minimum = 216ms, Maximum = 216ms, Average = 216ms
      -------------

      I believe it would be best if the CGI servlet could pass through the SystemRoot environment varibale by default, though in the interim a workaround is to set it via the CGI servlet's init parameters as follows.

      <Call name="setInitParameter">
      <Arg>ENV_SystemRoot</Arg>
      <Arg>C:\WINDOWS</Arg>
      </Call>

      1. cgi-servlet.patch
        0.9 kB
        David Yu
      2. cgi-windows.patch
        0.6 kB
        David Yu

        Activity

        Greg Wilkins made changes -
        Field Original Value New Value
        Assignee Leopold Agdeppa [ lagdeppa ]
        Greg Wilkins made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Greg Wilkins made changes -
        Assignee Leopoldo Agdeppa III [ lagdeppa ] David Yu [ dyu ]
        David Yu made changes -
        Attachment cgi-windows.patch [ 29591 ]
        David Yu made changes -
        Resolution Fixed [ 1 ]
        Fix Version/s 6.1.6rc1 [ 13653 ]
        Fix Version/s 6.1.6 [ 13654 ]
        Fix Version/s 6.1.6rc0 [ 13652 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Matt Sheppard made changes -
        Status Resolved [ 5 ] Reopened [ 4 ]
        Resolution Fixed [ 1 ]
        David Yu made changes -
        Attachment cgi-servlet.patch [ 29592 ]
        Greg Wilkins made changes -
        Resolution Fixed [ 1 ]
        Status Reopened [ 4 ] Resolved [ 5 ]

          People

          • Assignee:
            David Yu
            Reporter:
            Matt Sheppard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: