httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elu...@apache.org
Subject svn commit: r1726506 - in /httpd/httpd/trunk: docs/manual/mod/mod_cgi.xml modules/generators/mod_cgi.c modules/generators/mod_cgid.c
Date Sun, 24 Jan 2016 16:39:31 GMT
Author: elukey
Date: Sun Jan 24 16:39:30 2016
New Revision: 1726506

URL: http://svn.apache.org/viewvc?rev=1726506&view=rev
Log:
mod_cgi/mod_cgid documentation about environment variables added (like DOCUMENT_ROOT).
Bug: 58305


Modified:
    httpd/httpd/trunk/docs/manual/mod/mod_cgi.xml
    httpd/httpd/trunk/modules/generators/mod_cgi.c
    httpd/httpd/trunk/modules/generators/mod_cgid.c

Modified: httpd/httpd/trunk/docs/manual/mod/mod_cgi.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_cgi.xml?rev=1726506&r1=1726505&r2=1726506&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_cgi.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_cgi.xml Sun Jan 24 16:39:30 2016
@@ -100,7 +100,15 @@
 
       <dd>This will only be set if the CGI script is subject to
       authentication.</dd>
+
     </dl>
+    <p>This module also leverages the core functions 
+       <a href="https://ci.apache.org/projects/httpd/trunk/doxygen/group__APACHE__CORE__SCRIPT.html#ga0e81f9571a8a73f5da0e89e1f46d34b1">ap_add_common_vars</a>
and 
+       <a href="https://ci.apache.org/projects/httpd/trunk/doxygen/group__APACHE__CORE__SCRIPT.html#ga6b975cd7ff27a338cb8752381a4cc14f">ap_add_cgi_vars</a>

+       to add common CGI environment variables like <code>DOCUMENT_ROOT</code>

+       (this one from the related <directive module="core">DocumentRoot</directive>
directive). 
+       For an exhaustive list please check the code in the appropriate httpd branch.  
+    </p>   
 </section>
 
 <section id="cgi-debug"><title>CGI Debugging</title>

Modified: httpd/httpd/trunk/modules/generators/mod_cgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_cgi.c?rev=1726506&r1=1726505&r2=1726506&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_cgi.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_cgi.c Sun Jan 24 16:39:30 2016
@@ -21,10 +21,10 @@
  *
  * Adapted by rst from original NCSA code by Rob McCool
  *
- * Apache adds some new env vars; REDIRECT_URL and REDIRECT_QUERY_STRING for
- * custom error responses, and DOCUMENT_ROOT because we found it useful.
- * It also adds SERVER_ADMIN - useful for scripts to know who to mail when
- * they fail.
+ * This modules uses a httpd core function (ap_add_common_vars) to add some new env vars,

+ * like REDIRECT_URL and REDIRECT_QUERY_STRING for custom error responses and DOCUMENT_ROOT.
+ * It also adds SERVER_ADMIN - useful for scripts to know who to mail when they fail.
+ * 
  */
 
 #include "apr.h"

Modified: httpd/httpd/trunk/modules/generators/mod_cgid.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_cgid.c?rev=1726506&r1=1726505&r2=1726506&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_cgid.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_cgid.c Sun Jan 24 16:39:30 2016
@@ -21,10 +21,10 @@
  *
  * Adapted by rst from original NCSA code by Rob McCool
  *
- * Apache adds some new env vars; REDIRECT_URL and REDIRECT_QUERY_STRING for
- * custom error responses, and DOCUMENT_ROOT because we found it useful.
- * It also adds SERVER_ADMIN - useful for scripts to know who to mail when
- * they fail.
+ * This modules uses a httpd core function (ap_add_common_vars) to add some new env vars,

+ * like REDIRECT_URL and REDIRECT_QUERY_STRING for custom error responses and DOCUMENT_ROOT.
+ * It also adds SERVER_ADMIN - useful for scripts to know who to mail when they fail.
+ * 
  */
 
 #include "apr_lib.h"
@@ -1459,13 +1459,18 @@ static int cgid_handler(request_rec *r)
         return log_scripterror(r, conf, HTTP_NOT_FOUND, 0, APLOGNO(01266)
                                "AcceptPathInfo off disallows user's path");
     }
-/*
+    /*
     if (!ap_suexec_enabled) {
         if (!ap_can_exec(&r->finfo))
             return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, APLOGNO(01267)
                                    "file permissions deny server execution");
     }
-*/
+    */
+
+    /*
+     * httpd core function used to add common environment variables like
+     * DOCUMENT_ROOT. 
+     */
     ap_add_common_vars(r);
     ap_add_cgi_vars(r);
     env = ap_create_environment(r->pool, r->subprocess_env);



Mime
View raw message