You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ta...@apache.org on 2009/01/12 01:52:27 UTC

svn commit: r733557 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/core.xml docs/manual/new_features_2_4.xml modules/http/http_core.c

Author: takashi
Date: Sun Jan 11 16:52:26 2009
New Revision: 733557

URL: http://svn.apache.org/viewvc?rev=733557&view=rev
Log:
Enhance KeepAliveTimeout to support a value in milliseconds.
PR: 46275

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/docs/manual/mod/core.xml
    httpd/httpd/trunk/docs/manual/new_features_2_4.xml
    httpd/httpd/trunk/modules/http/http_core.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=733557&r1=733556&r2=733557&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sun Jan 11 16:52:26 2009
@@ -2,6 +2,9 @@
 Changes with Apache 2.3.2
 [ When backported to 2.2.x, remove entry from this file ]
 
+ *) core: Enhance KeepAliveTimeout to support a value in milliseconds.
+    PR 46275. [Takashi Sato]
+
  *) rotatelogs: Allow size units B, K, M, G and combination of
     time and size based rotation. [Rainer Jung]
 

Modified: httpd/httpd/trunk/docs/manual/mod/core.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/core.xml?rev=733557&r1=733556&r2=733557&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/core.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/core.xml Sun Jan 11 16:52:26 2009
@@ -1558,14 +1558,17 @@
 <name>KeepAliveTimeout</name>
 <description>Amount of time the server will wait for subsequent
 requests on a persistent connection</description>
-<syntax>KeepAliveTimeout <var>seconds</var></syntax>
+<syntax>KeepAliveTimeout <var>num</var>[ms]</syntax>
 <default>KeepAliveTimeout 5</default>
 <contextlist><context>server config</context><context>virtual host</context>
 </contextlist>
+<compatibility>Specifying a value in milliseconds is available in 
+Apache 2.3.2 and later</compatibility>
 
 <usage>
     <p>The number of seconds Apache will wait for a subsequent
-    request before closing the connection. Once a request has been
+    request before closing the connection. By adding a postfix of ms the
+    timeout can be also set in milliseconds. Once a request has been
     received, the timeout value specified by the
     <directive module="core">Timeout</directive> directive applies.</p>
 

Modified: httpd/httpd/trunk/docs/manual/new_features_2_4.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/new_features_2_4.xml?rev=733557&r1=733556&r2=733557&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/new_features_2_4.xml (original)
+++ httpd/httpd/trunk/docs/manual/new_features_2_4.xml Sun Jan 11 16:52:26 2009
@@ -33,8 +33,13 @@
 
   <section id="core">
     <title>Core Enhancements</title>
-    <!-- <dl>
-    </dl> -->
+    <dl>
+      <dt>KeepAliveTimeout in milliseconds</dt>
+
+      <dd>It has been made to be possible to specify <directive module="core"
+      >KeepAliveTimeout</directive> in milliseconds.
+      </dd>
+    </dl>
   </section>
 
   <section id="module">

Modified: httpd/httpd/trunk/modules/http/http_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_core.c?rev=733557&r1=733556&r2=733557&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_core.c (original)
+++ httpd/httpd/trunk/modules/http/http_core.c Sun Jan 11 16:52:26 2009
@@ -47,12 +47,16 @@
 static const char *set_keep_alive_timeout(cmd_parms *cmd, void *dummy,
                                           const char *arg)
 {
+    apr_interval_time_t timeout;
     const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
     if (err != NULL) {
         return err;
     }
 
-    cmd->server->keep_alive_timeout = apr_time_from_sec(atoi(arg));
+    /* Stolen from mod_proxy.c */
+    if (ap_timeout_parameter_parse(arg, &timeout, "s") != APR_SUCCESS)
+        return "KeepAliveTimeout has wrong format";
+    cmd->server->keep_alive_timeout = timeout;
     return NULL;
 }