Received: (from majordom@localhost) by hyperreal.com (8.8.5/8.8.5) id XAA28120; Mon, 28 Apr 1997 23:01:41 -0700 (PDT) Received: from paris.ics.uci.edu (mmdf@paris.ics.uci.edu [128.195.1.50]) by hyperreal.com (8.8.5/8.8.5) with SMTP id XAA28108 for ; Mon, 28 Apr 1997 23:01:37 -0700 (PDT) Received: from kiwi.ics.uci.edu by paris.ics.uci.edu id aa23473; 28 Apr 97 22:56 PDT To: new-httpd@apache.org Subject: Re: CGIWrap Problems (fwd) In-reply-to: Your message of "Mon, 28 Apr 1997 19:55:06 BST." Date: Mon, 28 Apr 1997 22:55:38 -0700 From: "Roy T. Fielding" Message-ID: <9704282256.aa23473@paris.ics.uci.edu> Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org This is a bug, not a feature. The find_path_info routine does not work right if the request has been made to a ScriptAlias which includes its own path_info as part of the result. The script is then fed the wrong SCRIPT_NAME, PATH_INFO, and PATH_TRANSLATED because find_path_info thinks that the real script name is part of the path. While this is related to the FILEPATH_INFO "feature", it is still a bug. .....Roy >Anyone seen this or understand why it's happening ? > >basically, with: > > ScriptAlias /cgi-bin/ /magma/web/cgi-bin/cgiwrapd/userid00/ > >calling the URL: > > /cgi-bin/test-cgi.pl/klgeddie/test > >produces: > > SCRIPT_NAME: '/cgi-bin' > PATH_INFO: '/test-cgi.pl/klgeddie/test' > PATH_TRANSLATED: '/magma/users/u20/userid00/public_html/userid00/test-cgi.pl/klgeddie/test' > > > >---------- Forwarded message ---------- >Date: Mon, 28 Apr 1997 12:54:25 -0400 >From: Kevin Geddie >To: apache-bugs@mail.apache.org >Subject: CGIWrap Problems > >Hello. I'm trying to get CGIWrap to run under Apache 1.2b8, and I believe >I have encountered a bug in Apache. I am attempting to set up CGIWrap for >a virtual host. > >Here are the lines in the httpd.conf file: > > > DocumentRoot /magma/users/u20/userid00/public_html > ServerAdmin klgeddie@magma.ca > ServerName some.domain.com > TransferLog logs/access_log.some.domain.com > # SRM Options > ScriptAlias /cgi-bin/ /magma/web/cgi-bin/cgiwrapd/userid00/ > > >The "cgiwrapd" program outputs debug information, and then attempts to run >the CGIWrap program. I am attempting to access the URL: > >http://some.domain.com/cgi-bin/test-cgi.pl/klgeddie/test > > >The CGIWrap program is getting the following environment variable settings >from the Apache web server: > >Environment Variables: > QUERY_STRING: '' > SCRIPT_NAME: '/cgi-bin' > PATH_INFO: '/test-cgi.pl/klgeddie/test' > PATH_TRANSLATED: >'/magma/users/u20/userid00/public_html/userid00/test-cgi.pl/klgeddie/test' > REMOTE_USER: '' > REMOTE_HOST: 'jupiter.magma.ca' > REMOTE_ADDR: '204.191.36.80' > > >I'm not exactly sure what's going on here, but I have a feeling that it >has something to do with parsing the ScriptAliased path, rather than the >requested path. > >I played around with the code a bit, in the util_script.c module. >The add_cgi_vars() function apparently sets the appropriate CGI environment >variables. I managed to figure out the following values in this function, >which may be of use to debuggers: > >r->path_info /userid00/test-cgi.pl/klgeddie/test >r->protocol HTTP/1.0 >r->uri /cgi-bin/test-cgi.pl/klgeddie/test >pa_req->filename /magma/users/u20/userid00/public_html/userid00 >pa_req->path_info /test-cgi.pl/klgeddie/test > > >Thank you. > > >--------------------------------------------------------------------------- >Kevin Geddie Fax: (613) 228-8313 > Magma Communications Ltd. Phone: (613) 228-3565 > Internet Service Provider WWW: http://www.magma.ca/ > OTTAWA, Ontario, Canada Email: klgeddie@magma.ca