<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>
*
* 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"
*
* 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"
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);