httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From taka...@apache.org
Subject svn commit: r883082 - in /httpd/httpd/trunk: CHANGES modules/http/http_core.c
Date Sun, 22 Nov 2009 14:30:51 GMT
Author: takashi
Date: Sun Nov 22 14:30:50 2009
New Revision: 883082

URL: http://svn.apache.org/viewvc?rev=883082&view=rev
Log:
KeepAlive no longer accepts other than On|Off.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/http/http_core.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=883082&r1=883081&r2=883082&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sun Nov 22 14:30:50 2009
@@ -10,6 +10,9 @@
      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]

Modified: httpd/httpd/trunk/modules/http/http_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_core.c?rev=883082&r1=883081&r2=883082&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_core.c (original)
+++ httpd/httpd/trunk/modules/http/http_core.c Sun Nov 22 14:30:50 2009
@@ -63,22 +63,14 @@
 }
 
 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 @@
     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 }
 };



Mime
View raw message