httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <>
Subject Re: CGIWrap Problems (fwd)
Date Tue, 29 Apr 1997 06:16:31 GMT
On Mon, 28 Apr 1997, Roy T. Fielding wrote:

> 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.

No, I disagree. It's a feature, not a bug. As I said in my other
message, the current behavior is the *only* way to maintain the
behavior that I believe is desirable. ScriptAlias was designed to map
a URL to a directory that contained scripts. It was not intended to map
to to CGI scripts, and was certainly not intended to map to CGI
scripts with additional path info not present in the request. It's
just an accident that people made use of.

SCRIPT_NAME and PATH_INFO, as defined, come out of the *URL*. The CGI
spec only defines PATH_TRANSLATED as being based on the filename. And
any extra stuff tacked on with ScriptAlias is very defenitely not
coming from any sort of URL, but from a filename. Therefore it is not
appropriate for it to be present in PATH_INFO.

This whole problem derives from the fact that in Apache, the URL's
path info can be distinct from the filename's path
info. Unfortunately, the CGI spec (and earlier versions of Apache)
treated them the same. There is no way of reconciliating this that
makes everyone happy, and I believe the current code to be the
cleanest solution.

> While this is related to the FILEPATH_INFO "feature", it is still a bug.

Wait a sec... FILEPATH_INFO is not a "feature", it's a hack around
Apache 1.2's correct behavior, because some people (like cgiwrap) were
relyin on the old and (IMHO) broken behavior.

Alexei Kosut <>      The Apache HTTP Server

View raw message