httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@ast.cam.ac.uk (David Robinson)
Subject Re: WWW Form Bug Report: "QUERY_STRING not set for index documents" on SunOS 4.x (fwd)
Date Fri, 01 Dec 1995 16:00:00 GMT
> From: WebMaster@mei.com
> To: apache-bugs%apache.org@organic.com
> Date: Wed Nov 29  6:00:33 1995
> Subject: WWW Form Bug Report: "QUERY_STRING not set for index documents" on SunOS 4.x
> 
> Operating system: SunOS 4.x, version: 
> 
> Symptoms:
> --
> Pretty minor...
> My index document is a script that calls itself
> with arguments
> i.e.
> 
> http://server/dir/?args
> 
> QUERY_STRING is undefined.  However, if I use 
> 
> http://server/dir/index.cgi?args
> 
> it does get set.  This works under Apache 0.6.5,
> but doesn't under 0.8.14.
> 
> Maybe not worth fixing/maybe this is the way it
> _should_ act.

The reason for this is that Apache 0.8.14 does a complete internal redirect for
a directory index. It redirects to the first DirectoryIndex URL that exists.
As this is a redirect, information on the original request (e.g. original
query information) is available to your CGI script via the REDIRECT_xxx
variables. (e.g. REDIRECT_QUERY_STRING.)

This behaviour adds the feature that your directory index could be anywhere on
the system. e.g.
DirectoryIndex /cgi-bin/doindex

Client requests http://server/dir/?wibble

The server internally redirects (i.e. restarts processing with a new URL)
to http://server/cgi-bin/doindex

A similar behaviour occurs with the Redirect directive; if I
Redirect /foo http://wombat/
then a request for http://server/foo/bar?wibble
is redirected to http://wombat/bar without ?wibble.

I suppose the best solution would be to allow DirectoryIndex and Redirect
to take a placeholder for the query string; e.g.
DirectoryIndex index.cgi?${QUERY_STRING}
then the query string of the original request would get substited in
the redirection.

 David Robinson.

Mime
View raw message