Jim Jagielski [Sat, 31 May 2008 11:57:54 +0000 (11:57 +0000)]
Merge r552029 from trunk:
* server/mpm/prefork/prefork.c (child_main): Stop processing new
connections if shutdown_pending is set, i.e. when SIGTERM is received
in single-proecss mode.
Jim Jagielski [Wed, 28 May 2008 12:58:29 +0000 (12:58 +0000)]
Merge r660726 from trunk:
* mod_proxy_http.c
Ensure that the EOC bucket is inserted BEFORE an EOS bucket in bb as
some resource filters like mod_deflate pass everything up to the EOS
down the chain immediately and sent the remainder of the brigade later
(or even never). But in this case the ap_http_header_filter does not
get out of our way soon enough.
http_filters.c
Remove all data buckets that are in a brigade after an EOC bucket
was seen, as an EOC bucket tells us that no (further) resource
and protocol data should go out to the client. OTOH meta buckets
are still welcome as they might trigger needed actions down in
the chain (e.g. in network filters like SSL).
Remark 1: It is needed to dump ALL data buckets in the brigade
since an filter in between might have inserted data
buckets BEFORE the EOC bucket sent by the original
sender and we do NOT want this data to be sent.
Remark 2: Dumping all data buckets here does not necessarily mean
that no further data is send to the client as:
1. Network filters like SSL can still be triggered via
meta buckets to talk with the client e.g. for a
clean shutdown.
2. There could be still data that was buffered before
down in the chain that gets flushed by a FLUSH or an
EOS bucket.
Jim Jagielski [Tue, 27 May 2008 16:23:12 +0000 (16:23 +0000)]
Merge r636386, r636653 from trunk:
* Restore the original request headers if the cached resource was stale, as they
may be needed by further output filters like the byterange filter to make the
correct decisions.
PR: 44579
* Do not do Range requests if we use our own conditionals for validating
a cache entity: If we get 304 the Range does not matter and otherwise the
entity changed and we want to have the complete entity.
Give users the ability to set the window size for apache bench runs. Useful
for benchmarking largefile downloads.
* Add siege-like behaviour to ApacheBench; output the results, as they have
accrued so far, when the user interrupts with ctrl-c. As the signal handler
is non-reentrant, we don't need volatiles, and the operations all look
signal-safe.
* Update the base version, since handling a signal differently is an external
API change of sorts.
* set the LastChangedRevision svn property, as ab.c has $Rev $ embedded, so
it really should be.
when compiling statistics, only interate accross requests which occured.
A keepalive response need not neccessarily have included any content-length
header, handle this case properly for 304 responses. PR39789
==================
r516175 | trawick
ab: Add -r option to continue after socket receive errors.
Submitted by: Filip Hanik <devlist hanik.com>
Reviewed by: trawick
==================
r541138 | sctemme
Explain that POST data should be sent as the correct MIME type.
Submitted by Vincent Bray noodlet at gmail dot com,
edited and reviewed by sctemme
==================
r655214 | fielding
Overhaul ab.c stats collection and reporting to avoid integer
truncation and time divisions within the test loop, retain
native time resolution until output, remove unused data,
avoid structure copies, consistently round milliseconds, and
generally avoid losing accuracy of calculation due to type casts.
Incidentally fixes output bug on gnuplot (seconds were being
output as microseconds). It would make more sense to output
gnuplot stats as microseconds after the start of test, but
this change returns us to consistency with pre-apr versions of ab.
PR: 44878, 44931.
==================
r655637 | fielding
Don't stop sending a request if EAGAIN is returned, which will only
happen if both the write and subsequent wait are returning EAGAIN,
and count posted bytes correctly when the initial write of a request
is not complete.
PR 10038, 38861, 39679
Submitted by: Patrick McManus <mcmanus datapower.com> (in 2003)
Stefan Fleiter <stefan.fleiter web.de> (in 2006)
and Davanum Srinivas (in 2006). Committed patch
contains parts of all three, tweaked by Roy (2008).
==================
r655654 | fielding
Improve client performance by clearing connection pool instead
of destroying it.
PR 40054
Submitted by: Brad Roberts <braddr puremagic.com>
Per discussion on list and based on user feedback, merge ApacheMonitor code
back to the trunk/ development effort. Provides for internationalized versions
of ApacheMonitor, and interoperability under Windows User Access Control (UAC)
restrictions. When ApacheMonitor cannot control a service, it will attempt
to launch a new version of itself, prompting the user for Admin-rights credentials.
Takashi Sato [Wed, 21 May 2008 18:13:31 +0000 (18:13 +0000)]
Merge r658549 and r658793 from trunk:
the example for IfDefine
*make the example for IfDefine use multiple-parameter.
Pointed out by: Andrew Ford <A.Ford ford-mason.co uk>
* and minor cleanups
Silly to maintain branch-work when a forward port will suffice.
I'd like to see this rm'ed and svn cp'ed from trunk to branch
for a clearer history of it's current development. The ab and
other support tools clearly have nothing to do with maintaining
binary compatibility on subversion to subversion releases.
Still need similar votes for ApacheMonitor refactoring.
Ruediger Pluem [Sat, 17 May 2008 19:50:14 +0000 (19:50 +0000)]
Merge r654119 from trunk:
* modules/ssl/mod_ssl.c (ssl_cleanup_pre_config): Remove the call to
CRYPTO_cleanup_all_ex_data here, fixing a per-connection memory leak
which occurs if the client indicates support for a compression
algorithm in the initial handshake, and mod_ssl is linked against
OpenSSL >= 0.9.8f.
Thanks to Amund Elstad and Dr Stephen Henson for analysis of this
issue.
Ruediger Pluem [Sat, 17 May 2008 19:47:38 +0000 (19:47 +0000)]
Merge r645813 from trunk:
* In the case that we fail to read the response line from the backend and if
we are a reverse proxy request shutdown the connection WITHOUT ANY response
to trigger a retry by the client if allowed (as for idempotent requests).
BUT currently we should not do this if the request is the first request on
a keepalive connection as browsers like seamonkey only display an empty page
in this case and do not do a retry.
* Enable the proxy to keep connections persistent in the HTTPS case.
Basicly the persistence is created by keeping the conn_rec structure
created for our backend connection (whether http or https) in the connection
pool. This required to adjust scoreboard.c in a way that its functions can
properly deal with a NULL scoreboard handle by ignoring the call or returning
an error code.
* Use a separate subpool to manage the data for the socket and the connection
member of the proxy_conn_rec struct as we destroy this data more frequently
than other data in the proxy_conn_rec struct like hostname and addr (at least
in the case where we have keepalive connections that timed out and were
closed by the backend).
This fixes a memory leak with short lived and broken connections.
* Fix another memory leak related to PR 44026. Now that we keep the connection
data structure alive in the reslist, the live time of c->pool is too long.
r->pool has the correct live time since rp dies before r.
* Do not register connection_cleanup as cleanup for the conn->pool. In the past
it was needed to register connection_cleanup as a cleanup for the frontend
connection memory pool (c->pool) to ensure that connection returns into the
connection pool if the memory pool of the frontend connection memory pool
gets destroyed / cleared. Now we ensure explicitly the connection returns
to the connection pool once we finished handling the request.
* Tag the pools appropriately to ease memory debugging.
* Only sent a flush bucket down the chain if buckets where sent down the chain
before that could still be buffered in the network filter. This is the case
if we have sent an EOS bucket or if we actually sent buckets with
data down the chain. In all other cases we either have not sent any
buckets at all down the chain or we only sent meta buckets that are
not EOS buckets down the chain. The only meta bucket that remains in
this case is the flush bucket which would have removed all possibly
buffered buckets in the network filter.
If we sent a flush bucket in the case where not ANY buckets were
sent down the chain, we break error handling which happens AFTER us.
* Using the reslist pool for the proxy_conn_rec structure introduces a memory
leak when connections get created and destroyed frequently by the reslist
(e.g. destroying idle elements of the reslist). So use the subpool
dedicated for the proxy_conn_rec structure to allocate the memory for the
structure itself.