Mailing List Archive

SSI cgi and the query string (fwd)
No ack sent..

Forwarded message:
> From scott@wiggin.uniserve.com Wed Nov 15 18:20:20 1995
> Date: Wed, 15 Nov 1995 18:19:58 -0800 (PST)
> From: Scott <scott@uniserve.com>
> To: apache-bugs@mail.apache.org
> Subject: SSI cgi and the query string
> Message-ID: <Pine.LNX.3.91.951115181412.1525A-100000@wiggin.uniserve.com>
> MIME-Version: 1.0
> Content-Type: TEXT/PLAIN; charset=US-ASCII
>
>
> Okay, this technically isn't a bug...just a problem for me :)
>
> I'm curious about why this bit of code exists in mod_include.c,
> include_cgi() approximately line 327:
>
> /* No hardwired path info or query allowed */
>
> if ((rr->path_info && rr->path_info[0]) || rr->args) return -1;
> if (rr->finfo.st_mode == 0) return -1;
>
> /* Script gets parameters of the *document*, for back compatibility */
>
> rr->path_info = r->path_info; /* painful to get right; see mod_cgi.c */
> rr->args = r->args;
>
> Umm..why is there no query string allowed? I have a use for being able to
> send a query string from an exec cgi (actually...many uses). I just
> commented out the above and it works great, so why is it there? Have I
> done a bad thing by ditching it?
>
>
> Cheers,
>
> Scott Goodman
> UNIServe Online
>
Re: SSI cgi and the query string (fwd) [ In reply to ]
That's there strictly for back-compatibility with the way
<!--#exec cgi--> worked in old code; it's an ugly hack.
Note that <!--#include virtual--> doesn't have that code, and
can invoke CGI scripts in Apache; that might do what the guy
wants...

rst
Re: SSI cgi and the query string (fwd) [ In reply to ]
On Thu, 16 Nov 1995, Robert S. Thau wrote:
> That's there strictly for back-compatibility with the way
> <!--#exec cgi--> worked in old code; it's an ugly hack.
> Note that <!--#include virtual--> doesn't have that code, and
> can invoke CGI scripts in Apache; that might do what the guy
> wants...

What breaks in HTML written for the old code if query strings are allowed?

Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com brian@hyperreal.com http://www.[hyperreal,organic].com/
Re: SSI cgi and the query string (fwd) [ In reply to ]
What breaks in HTML written for the old code if query strings are allowed?

The old behavior for <!--#exec cgi--> which the hack in question emulates
is to pass the QUERY_STRING which came in with the requested URL (for the
SSI document) to the script. Scripts which were expecting to see arguments
supplied by the user (rather than by the URL in the <!--#exec--> would
thus fail.

rst
Re: SSI cgi and the query string (fwd) [ In reply to ]
On Sun, 19 Nov 1995, Robert S. Thau wrote:
> What breaks in HTML written for the old code if query strings are allowed?
>
> The old behavior for <!--#exec cgi--> which the hack in question emulates
> is to pass the QUERY_STRING which came in with the requested URL (for the
> SSI document) to the script. Scripts which were expecting to see arguments
> supplied by the user (rather than by the URL in the <!--#exec--> would
> thus fail.

Seems like there could be a graceful fallback mechanism to this - like
when there is a query_string in the <!--#exec cgi--> that takes
precedence to the query_string in the html page request.

Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com brian@hyperreal.com http://www.[hyperreal,organic].com/