]> granicus.if.org Git - apache/commitdiff
core: Follow up to r1664071: comments on new keep_alive_timeout_set flag.
authorYann Ylavic <ylavic@apache.org>
Thu, 5 Mar 2015 10:41:19 +0000 (10:41 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 5 Mar 2015 10:41:19 +0000 (10:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664299 13f79535-47bb-0310-9956-ffa450edef68

include/httpd.h
modules/http/http_core.c

index 7776b7c792a1a04842bc4b463cd43005b48878e8..e6cf10fe80f0d9a334d68ef56635507f81c274fa 100644 (file)
@@ -1338,8 +1338,9 @@ struct server_rec {
     /** Opaque storage location */
     void *context;
 
-    /** Whether the keepalive timeout is explicit or inherited
-     *  from the default vhost or main server. */
+    /** Whether the keepalive timeout is explicit (1) or
+     *  inherited (0) from the base server (either first
+     *  server on the same IP:port or main server) */
     unsigned int keep_alive_timeout_set:1;
 };
 
index 0c8662f437389a16349ac0116887f921e20b90b3..345de8109ae119860b0fdb8bd393587760fa2a48 100644 (file)
@@ -61,6 +61,14 @@ static const char *set_keep_alive_timeout(cmd_parms *cmd, void *dummy,
     if (ap_timeout_parameter_parse(arg, &timeout, "s") != APR_SUCCESS)
         return "KeepAliveTimeout has wrong format";
     cmd->server->keep_alive_timeout = timeout;
+
+    /* We don't want to take into account whether or not KeepAliveTimeout is
+     * set for the main server, because if no http_module directive is used
+     * for a vhost, it will inherit the http_srv_cfg from the main server.
+     * However keep_alive_timeout_set helps determine whether the vhost should
+     * use its own configured timeout or the one from the vhost delared first
+     * on the same IP:port (ie. c->base_server, and the legacy behaviour).
+     */
     if (cmd->server->is_virtual) {
         cmd->server->keep_alive_timeout_set = 1;
     }