]> granicus.if.org Git - apache/commit
Merge r1664071, r1664299 from trunk:
authorJim Jagielski <jim@apache.org>
Tue, 31 Mar 2015 12:57:46 +0000 (12:57 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 31 Mar 2015 12:57:46 +0000 (12:57 +0000)
commit1f2f1b9d13834a7a9a8ec8613f68fadd91ed1522
tree2e1597df5aa11acd7430b4c2da4df66a3c34480f
parentb2b44098eb1e3f4bd9667b560c483e25c41bebd8
Merge r1664071, r1664299 from trunk:

core: If explicitly configured, use the KeepaliveTimeout value of the
virtual host which handled the latest request on the connection, or by
default the one of the first virtual host bound to the same IP:port.

For non-async MPMs, use either r->server's or c->base_server's value in
ap_process_http_sync_connection() depending on a new server_rec's flag
called keep_alive_timeout_set and determined at config time.

For event MPM, use a queue per timeout value, chaining the queues per
type (keepalive wrt KeepAliveTimeout, write completion wrt to Timeout)
so that maintenance can be done on all the queues from the head, and such
that insertions/maintenance remain in O(1).
A server config is created and pointing to the queue of each vhost at
post_config time, hence the config can be associated to the connection
state (cs) at post_read_request time (keep_alive_timeout_set is used to
determine r->server vs c->base_server here), and we can simply insert
with TO_QUEUE_INSERT(cs->sc->q, cs).  PR56226.

While at it, since each queue now embeds it own timeout and hence the
expiration_time of the cs has changed to a queue_timestamp (the time it
was queued), we can detect clock skews and expire entries immediatly if
the system is set (eg. far) in the past during runtime and we want to
avoid waiting for (eg.) centuries before the current logic kills them.
Any entry which is registered above now + q->timeout is concerned, and
is now cleaned from the queue when encountered.  PR57374.

core: Follow up to r1664071: comments on new keep_alive_timeout_set flag.
Submitted by: ylavic
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1670326 13f79535-47bb-0310-9956-ffa450edef68
CHANGES
STATUS
docs/manual/mod/core.xml
include/ap_mmn.h
include/httpd.h
modules/http/http_core.c
server/mpm/event/event.c