httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Welton <davidnwel...@gmail.com>
Subject Re: httpd 1.3 mod_cgi argv[0]
Date Mon, 27 Jun 2005 08:48:00 GMT
On 6/26/05, Joe Orton <jorton@redhat.com> wrote:
> On Thu, Jun 23, 2005 at 11:23:55AM +0200, David Welton wrote:

> > 4763  execve("/usr/lib/cgi-bin/protect.cgi", ["protect.cgi"], [/* 25
> > vars */]) = 0
> >
> > My question is this: why doesn't argv[0] get the full path of the
> > file?  It's not like the CGI can't figure it out from the cwd and the
> > argv0 it does get.  The Tcl folks are wondering why Apache does things
> > this way, and I think it's a reasonable question.  The problem for Tcl

> I think the current behaviour is actually just a fall-out from the way
> that the code checks whether the script is an nph- script or not
> (searching for the basename and then comparing against "nph-").  In 2.0
> with mod_cgi, the argv[0] really is set to r->filename as you expect,
> though the same is not true of mod_cgid.

I was sort of hoping one of the 'old timers' might have a recollection
of a reason behind this, but I guess it may just be an artifact of how
things were originally put together.  The 'problem' is pretty obscure
and apparently not many people have noticed it.

> So upgrading to 2.0 is one solution, at least. I'm not sure it would be
> a great idea to change something this subtle in 1.3 now.

Could well be.  In any case, Tcl also needs to be 'more liberal with
what it accepts' even if that data is not ideal, so a fix should
happen there as well.

Thankyou,
-- 
David N. Welton
 - http://www.dedasys.com/davidw/

Apache, Linux, Tcl Consulting
 - http://www.dedasys.com/

Mime
View raw message