]> granicus.if.org Git - apache/commitdiff
mod_cgi/mod_cgid documentation about environment variables added (like DOCUMENT_ROOT).
authorLuca Toscano <elukey@apache.org>
Sun, 24 Jan 2016 16:39:30 +0000 (16:39 +0000)
committerLuca Toscano <elukey@apache.org>
Sun, 24 Jan 2016 16:39:30 +0000 (16:39 +0000)
Bug: 58305

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726506 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_cgi.xml
modules/generators/mod_cgi.c
modules/generators/mod_cgid.c

index b459c48bb6df5e2fd069618191294d8c0a496f4f..e7035c2f25c5951a15c50e3f848d566173047aad 100644 (file)
 
       <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>
index 28d93c535b53b0dfb898db15e6f520dff79fd230..000f06e5bd52a960560d358bddb08e27864db0d7 100644 (file)
  *
  * 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"
index a605c0ba4fee613950312281858973f363b2c31b..edc2524929a9233988535e144e456b24d78084d6 100644 (file)
  *
  * 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);