summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/manual/mod/mod_cgi.html.en25
-rw-r--r--docs/manual/mod/mod_cgi.xml25
-rw-r--r--docs/manual/mod/mod_deflate.html.en9
-rw-r--r--docs/manual/mod/mod_deflate.xml9
-rw-r--r--modules/generators/mod_cgi.c8
-rw-r--r--modules/generators/mod_cgid.c17
6 files changed, 81 insertions, 12 deletions
diff --git a/docs/manual/mod/mod_cgi.html.en b/docs/manual/mod/mod_cgi.html.en
index 7d4aff7b3c..e7484bb595 100644
--- a/docs/manual/mod/mod_cgi.html.en
+++ b/docs/manual/mod/mod_cgi.html.en
@@ -115,7 +115,32 @@
<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 environment variables like:</p>
+ <dl>
+ <dt>DOCUMENT_ROOT</dt>
+
+ <dd>Set with the content of the related <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> directive.</dd>
+
+ <dt>SERVER_NAME</dt>
+
+ <dd>The fully qualified domain name related to the request.</dd>
+
+ <dt>SERVER_ADDR</dt>
+
+ <dd>The IP address of the Virtual Host serving the request.</dd>
+
+ <dt>SERVER_ADMIN</dt>
+
+ <dd>Set with the content of the related <code class="directive"><a href="../mod/core.html#serveradmin">ServerAdmin</a></code> directive.</dd>
+ </dl>
+ <p>For an exhaustive list it is suggested to write a basic CGI script
+ that dumps all the environment variables passed by Apache in a convenient format.
+ </p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="cgi-debug" id="cgi-debug">CGI Debugging</a></h2>
diff --git a/docs/manual/mod/mod_cgi.xml b/docs/manual/mod/mod_cgi.xml
index b459c48bb6..aa7dd93943 100644
--- a/docs/manual/mod/mod_cgi.xml
+++ b/docs/manual/mod/mod_cgi.xml
@@ -100,7 +100,32 @@
<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 environment variables like:</p>
+ <dl>
+ <dt>DOCUMENT_ROOT</dt>
+
+ <dd>Set with the content of the related <directive module="core">DocumentRoot</directive> directive.</dd>
+
+ <dt>SERVER_NAME</dt>
+
+ <dd>The fully qualified domain name related to the request.</dd>
+
+ <dt>SERVER_ADDR</dt>
+
+ <dd>The IP address of the Virtual Host serving the request.</dd>
+
+ <dt>SERVER_ADMIN</dt>
+
+ <dd>Set with the content of the related <directive module="core">ServerAdmin</directive> directive.</dd>
+ </dl>
+ <p>For an exhaustive list it is suggested to write a basic CGI script
+ that dumps all the environment variables passed by Apache in a convenient format.
+ </p>
</section>
<section id="cgi-debug"><title>CGI Debugging</title>
diff --git a/docs/manual/mod/mod_deflate.html.en b/docs/manual/mod/mod_deflate.html.en
index cfbbbc7776..48311d91ce 100644
--- a/docs/manual/mod/mod_deflate.html.en
+++ b/docs/manual/mod/mod_deflate.html.en
@@ -252,7 +252,14 @@ content</a></h2>
</table>
<p>The <code class="directive">DeflateBufferSize</code> directive specifies
the size in bytes of the fragments that zlib should compress at one
- time.</p>
+ time. If the compressed response size is bigger than the one specified
+ by this directive then httpd will switch to chunked encoding
+ (HTTP header <code>Transfer-Encoding</code> set to <code>Chunked</code>), with the
+ side effect of not setting any <code>Content-Length</code> HTTP header. This is particularly
+ important when httpd works behind reverse caching proxies or when httpd is configured with
+ <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code> and <code class="module"><a href="../mod/mod_cache_disk.html">mod_cache_disk</a></code> because
+ HTTP responses without any <code>Content-Length</code> header might not be cached.
+ </p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
diff --git a/docs/manual/mod/mod_deflate.xml b/docs/manual/mod/mod_deflate.xml
index 8bec31c758..31647d49ec 100644
--- a/docs/manual/mod/mod_deflate.xml
+++ b/docs/manual/mod/mod_deflate.xml
@@ -296,7 +296,14 @@ CustomLog "logs/deflate_log" deflate
<usage>
<p>The <directive>DeflateBufferSize</directive> directive specifies
the size in bytes of the fragments that zlib should compress at one
- time.</p>
+ time. If the compressed response size is bigger than the one specified
+ by this directive then httpd will switch to chunked encoding
+ (HTTP header <code>Transfer-Encoding</code> set to <code>Chunked</code>), with the
+ side effect of not setting any <code>Content-Length</code> HTTP header. This is particularly
+ important when httpd works behind reverse caching proxies or when httpd is configured with
+ <module>mod_cache</module> and <module>mod_cache_disk</module> because
+ HTTP responses without any <code>Content-Length</code> header might not be cached.
+ </p>
</usage>
</directivesynopsis>
diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c
index ffbef7ebfa..00bd02b5a4 100644
--- a/modules/generators/mod_cgi.c
+++ b/modules/generators/mod_cgi.c
@@ -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"
diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c
index 32a8d3351b..857e137b88 100644
--- a/modules/generators/mod_cgid.c
+++ b/modules/generators/mod_cgid.c
@@ -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"
@@ -1457,13 +1457,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);