diff options
author | Yann Ylavic <ylavic@apache.org> | 2015-03-05 11:41:19 +0100 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2015-03-05 11:41:19 +0100 |
commit | 03a97d3da091a6e7cb9d352b0cae1611367a2f63 (patch) | |
tree | 4c95532a8644d8217ce50894b18ba616e88a11b5 | |
parent | * Setup the usual svn:ignore properties for MPM's (diff) | |
download | apache2-03a97d3da091a6e7cb9d352b0cae1611367a2f63.tar.xz apache2-03a97d3da091a6e7cb9d352b0cae1611367a2f63.zip |
core: Follow up to r1664071: comments on new keep_alive_timeout_set flag.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664299 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | include/httpd.h | 5 | ||||
-rw-r--r-- | modules/http/http_core.c | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/include/httpd.h b/include/httpd.h index 7776b7c792..e6cf10fe80 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -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; }; diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 0c8662f437..345de8109a 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -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; } |