]> granicus.if.org Git - apache/commitdiff
Backporting documentation changes from trunk related to mod_cgi/cgid and mod_deflate
authorLuca Toscano <elukey@apache.org>
Mon, 1 Feb 2016 22:33:57 +0000 (22:33 +0000)
committerLuca Toscano <elukey@apache.org>
Mon, 1 Feb 2016 22:33:57 +0000 (22:33 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1728020 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_cgi.html.en
docs/manual/mod/mod_cgi.xml
docs/manual/mod/mod_deflate.html.en
docs/manual/mod/mod_deflate.xml
modules/generators/mod_cgi.c
modules/generators/mod_cgid.c

index 7d4aff7b3c1ea554055ff842e18053af36859953..e7484bb59594c8d6cc3aa4d613d29761e3fa94e2 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 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>
index b459c48bb6df5e2fd069618191294d8c0a496f4f..aa7dd939437349a157c6c8897ba0b87c99651a91 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 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>
index cfbbbc777673add11b314dca0a66625665299f62..48311d91ceab8414a1448be4947d2ef1052404e4 100644 (file)
@@ -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>
index 8bec31c75845338e74141212882643f8c9048595..31647d49ec2b04c8306f13bfe1dc82f5b0af38d7 100644 (file)
@@ -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>
 
index ffbef7ebfab3967bc901bc026cda53c3a75bc835..00bd02b5a44b39a534e6fa16f18417d5008e7c6f 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 32a8d3351b0846b7269e26a39f1f25f75ae7b742..857e137b88df4afa877ec7ede5a6428643b282ce 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"
@@ -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);