Home | History | Annotate | Download | only in bin
      1 #!/bin/sh
      2 
      3 #
      4 # Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
      5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      6 #
      7 # This code is free software; you can redistribute it and/or modify it
      8 # under the terms of the GNU General Public License version 2 only, as
      9 # published by the Free Software Foundation.  Oracle designates this
     10 # particular file as subject to the "Classpath" exception as provided
     11 # by Oracle in the LICENSE file that accompanied this code.
     12 #
     13 # This code is distributed in the hope that it will be useful, but WITHOUT
     14 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
     15 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
     16 # version 2 for more details (a copy is included in the LICENSE file that
     17 # accompanied this code).
     18 #
     19 # You should have received a copy of the GNU General Public License version
     20 # 2 along with this work; if not, write to the Free Software Foundation,
     21 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
     22 #
     23 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
     24 # or visit www.oracle.com if you need additional information or have any
     25 # questions.
     26 #
     27 
     28 #
     29 #
     30 
     31 #
     32 # This script executes the Java interpreter, defines properties
     33 # that correspond to the CGI 1.0 environment variables, and executes
     34 # the class "sun.rmi.transport.proxy.CGIHandler".  It should be
     35 # installed in the directory to which the HTTP server maps the
     36 # URL path "/cgi-bin".
     37 #
     38 # (Configuration is necessary as noted below.)
     39 #
     40 # This class will support a QUERY_STRING of the form "forward=<port>"
     41 # with a REQUEST_METHOD "POST".  The body of the request will be
     42 # forwarded (as another POST request) to the server listening on the
     43 # specified port (must be >= 1024).  The response from this forwarded
     44 # request will be the response to the original request.
     45 #
     46 # CONFIGURATION:
     47 #
     48 # Fill in correct absolute path to Java interpreter below.  For example,
     49 # the "PATH=" line might be changed to the follow if the JDK is installed
     50 # at the path "/home/peter/java":
     51 #
     52 # PATH=/home/peter/java/bin:$PATH
     53 #
     54 PATH=/usr/local/java/bin:$PATH
     55 exec java \
     56 	-DAUTH_TYPE="$AUTH_TYPE" \
     57 	-DCONTENT_LENGTH="$CONTENT_LENGTH" \
     58 	-DCONTENT_TYPE="$CONTENT_TYPE" \
     59 	-DGATEWAY_INTERFACE="$GATEWAY_INTERFACE" \
     60 	-DHTTP_ACCEPT="$HTTP_ACCEPT" \
     61 	-DPATH_INFO="$PATH_INFO" \
     62 	-DPATH_TRANSLATED="$PATH_TRANSLATED" \
     63 	-DQUERY_STRING="$QUERY_STRING" \
     64 	-DREMOTE_ADDR="$REMOTE_ADDR" \
     65 	-DREMOTE_HOST="$REMOTE_HOST" \
     66 	-DREMOTE_IDENT="$REMOTE_IDENT" \
     67 	-DREMOTE_USER="$REMOTE_USER" \
     68 	-DREQUEST_METHOD="$REQUEST_METHOD" \
     69 	-DSCRIPT_NAME="$SCRIPT_NAME" \
     70 	-DSERVER_NAME="$SERVER_NAME" \
     71 	-DSERVER_PORT="$SERVER_PORT" \
     72 	-DSERVER_PROTOCOL="$SERVER_PROTOCOL" \
     73 	-DSERVER_SOFTWARE="$SERVER_SOFTWARE" \
     74 	sun.rmi.transport.proxy.CGIHandler
     75