]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
KeepAlive no longer accepts other than On|Off.
authorTakashi Sato <takashi@apache.org>
Sun, 22 Nov 2009 14:30:50 +0000 (14:30 +0000)
committerTakashi Sato <takashi@apache.org>
Sun, 22 Nov 2009 14:30:50 +0000 (14:30 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@883082 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http/http_core.c

diff --git a/CHANGES b/CHANGES
index da6296ad4245f2dab0a5edf2b5e3fef30297f624..5bb604c20ea3f75281fbe8fc5ef644c7f5e898d1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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]
index ae97d314c530e4e3ce7bf9c38fe7ce948c448e74..8d4471eae06085b2e47efd3f4c2422ca1b289f82 100644 (file)
@@ -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 }
 };