diff options
author | Takashi Sato <takashi@apache.org> | 2009-01-12 01:52:26 +0100 |
---|---|---|
committer | Takashi Sato <takashi@apache.org> | 2009-01-12 01:52:26 +0100 |
commit | 5585fc8d5bce4cd60fea9f4c335af3ba1759e5e0 (patch) | |
tree | df647308e980be08789bd7a6e215742e94529da1 /modules/http | |
parent | Adopt latest changes in usage message. (diff) | |
download | apache2-5585fc8d5bce4cd60fea9f4c335af3ba1759e5e0.tar.xz apache2-5585fc8d5bce4cd60fea9f4c335af3ba1759e5e0.zip |
Enhance KeepAliveTimeout to support a value in milliseconds.
PR: 46275
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@733557 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http')
-rw-r--r-- | modules/http/http_core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/http/http_core.c b/modules/http/http_core.c index fdf86c0644..2108b869ad 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -47,12 +47,16 @@ static int ap_process_http_connection(conn_rec *c); 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; } |