diff options
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | modules/http/http_core.c | 14 |
2 files changed, 6 insertions, 11 deletions
@@ -10,6 +10,9 @@ Changes with Apache 2.3.3 mod_proxy_ftp: NULL pointer dereference on error paths. [Stefan Fritsch <sf fritsch.de>, Joe Orton] + *) http_core: KeepAlive no longer accepts other than On|Off. + [Takashi Sato] + *) mod_dav: Remove errno from dav_error interface. Calls to dav_new_error() and dav_new_error_tag() must be adjusted to add an apr_status_t parameter. [Jeff Trawick] diff --git a/modules/http/http_core.c b/modules/http/http_core.c index ae97d314c5..8d4471eae0 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -63,22 +63,14 @@ static const char *set_keep_alive_timeout(cmd_parms *cmd, void *dummy, } static const char *set_keep_alive(cmd_parms *cmd, void *dummy, - const char *arg) + int arg) { const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE); if (err != NULL) { return err; } - /* We've changed it to On/Off, but used to use numbers - * so we accept anything but "Off" or "0" as "On" - */ - if (!strcasecmp(arg, "off") || !strcmp(arg, "0")) { - cmd->server->keep_alive = 0; - } - else { - cmd->server->keep_alive = 1; - } + cmd->server->keep_alive = arg; return NULL; } @@ -100,7 +92,7 @@ static const command_rec http_cmds[] = { AP_INIT_TAKE1("MaxKeepAliveRequests", set_keep_alive_max, NULL, RSRC_CONF, "Maximum number of Keep-Alive requests per connection, " "or 0 for infinite"), - AP_INIT_TAKE1("KeepAlive", set_keep_alive, NULL, RSRC_CONF, + AP_INIT_FLAG("KeepAlive", set_keep_alive, NULL, RSRC_CONF, "Whether persistent connections should be On or Off"), { NULL } }; |