You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2003/02/18 04:07:32 UTC
DO NOT REPLY [Bug 17148] New: -
SCRIPT_URI is missing port number for implied files from DirectoryIndex
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17148>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17148
SCRIPT_URI is missing port number for implied files from DirectoryIndex
Summary: SCRIPT_URI is missing port number for implied files from
DirectoryIndex
Product: Apache httpd-2.0
Version: 2.0.44
Platform: PC
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: Other
Component: mod_dir
AssignedTo: bugs@httpd.apache.org
ReportedBy: mattb@columbia.edu
I'm only guessing this is in mod_dir...it could be in mod_rewrite or something
entirely different for all I know.
Here's how to reproduce:
1. run a webserver on port 8080:
Listen 8080
2. create a cgi-directory with the following properties
Options +ExecCGI
AddHandler cgi-script .cgi
DirectoryIndex index.html ... index.cgi
3. create a file called index.cgi in that directory:
- - - - - - - - %< CUT HERE >% - - - - - - - -
#!/bin/sh
echo 'Content-type: text/html'
echo
echo '<pre>'
echo "\$SCRIPT_URI = $SCRIPT_URI"
echo '</pre>'
exit 0
- - - - - - - - %< CUT HERE >% - - - - - - - -
4. Navigate to that file on your server. For example:
lynx -source http://somehost.somedomain:8080/cgi-bin/index.cgi
You should see the following output:
<pre>
$SCRIPT_URI = http://somehost.somedomain:8080/cgi-bin/index.cgi
</pre>
5. Now navigate to just the CGI directory and let DirectoryIndex resolve to
index.cgi for you. For example:
lynx -source http://somehost.somedomain:8080/cgi-bin/
You should now see the following output:
<pre>
$SCRIPT_URI = http://somehost.somedomain/cgi-bin/
</pre>
6. Notice how the port is missing in the second output.
Another way to see this is when running PHP in Apache. The
$_SERVER['SCRIPT_URI'] entry will be missing the port number for any script
arrived at through DirectoryIndex resolution.
I have not tried experimenting with any of the Rewrite* directives. I have not
tried this in Apache 1.x.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org