From: William A. Rowe Jr Date: Mon, 29 Aug 2005 20:12:43 +0000 (+0000) Subject: Correct mod_cgid's argv[0] so that the full path can be delved by the X-Git-Tag: 2.3.0~3044 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f87b4c1af176b15430b5ecaa17618739f8c479be;p=thirdparty%2Fapache%2Fhttpd.git Correct mod_cgid's argv[0] so that the full path can be delved by the invoked cgi application, to conform to the behavior of mod_cgi. PR: 34542 Reviewed by: Andre, OtherBill Submitted by: Pradeep Kumar S git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264623 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 8f83c3359c6..5392692e468 100644 --- a/CHANGES +++ b/CHANGES @@ -2,7 +2,11 @@ Changes with Apache 2.3.0 [Remove entries to the current 2.0 and 2.2 section below, when backported] - *) Doxygen fixup [Neale Ranns neale ranns.org, Ian Holsman] + *) Correct mod_cgid's argv[0] so that the full path can be delved by the + invoked cgi application, to conform to the behavior of mod_cgi. + [Pradeep Kumar S ] + + *) Doxygen fixup [Neale Ranns , Ian Holsman] *) prefork, worker and event MPMs: Support a graceful-stop procedure: Server will wait until existing requests are finished or until diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 80ad1b4bbe7..7daad06685b 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -1319,10 +1319,7 @@ static int cgid_handler(request_rec *r) nph = !(strncmp(argv0, "nph-", 4)); - if ((argv0 = strrchr(r->filename, '/')) != NULL) - argv0++; - else - argv0 = r->filename; + argv0 = r->filename; if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r)) return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,