summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/log-message-tags/next-number2
-rw-r--r--include/mod_core.h4
-rw-r--r--modules/filters/mod_include.c1
-rw-r--r--modules/http2/h2_conn.c2
-rw-r--r--server/main.c2
-rw-r--r--server/mpm/event/event.c2
-rw-r--r--server/mpm_unix.c3
-rw-r--r--server/request.c17
8 files changed, 21 insertions, 12 deletions
diff --git a/docs/log-message-tags/next-number b/docs/log-message-tags/next-number
index 386586617c..3cd74ff17f 100644
--- a/docs/log-message-tags/next-number
+++ b/docs/log-message-tags/next-number
@@ -1 +1 @@
-10003
+10004
diff --git a/include/mod_core.h b/include/mod_core.h
index 8eab3e12c4..cb88db7dc7 100644
--- a/include/mod_core.h
+++ b/include/mod_core.h
@@ -45,6 +45,10 @@ AP_DECLARE_DATA extern ap_filter_rec_t *ap_chunk_filter_handle;
AP_DECLARE_DATA extern ap_filter_rec_t *ap_http_outerror_filter_handle;
AP_DECLARE_DATA extern ap_filter_rec_t *ap_byterange_filter_handle;
+typedef struct {
+ apr_bucket_brigade *tmp_bb;
+} http_conn_config;
+
/*
* These (input) filters are internal to the mod_core operation.
*/
diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c
index 9f69d8adf9..a342e2794d 100644
--- a/modules/filters/mod_include.c
+++ b/modules/filters/mod_include.c
@@ -3783,6 +3783,7 @@ static apr_status_t send_parsed_content(ap_filter_t *f, apr_bucket_brigade *bb)
/* if something's left over, pass it along */
if (!APR_BRIGADE_EMPTY(pass_bb)) {
rv = ap_pass_brigade(f->next, pass_bb);
+ apr_brigade_cleanup(pass_bb);
}
else {
rv = APR_SUCCESS;
diff --git a/modules/http2/h2_conn.c b/modules/http2/h2_conn.c
index a8de28425b..7b504d0ee0 100644
--- a/modules/http2/h2_conn.c
+++ b/modules/http2/h2_conn.c
@@ -280,7 +280,7 @@ conn_rec *h2_slave_create(conn_rec *master, int slave_id, apr_pool_t *parent)
status = apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_DEFAULT, pool);
if (status != APR_SUCCESS) {
ap_log_cerror(APLOG_MARK, APLOG_ERR, status, master,
- APLOGNO() "h2_session(%ld-%d): create slave mutex",
+ APLOGNO(10004) "h2_session(%ld-%d): create slave mutex",
master->id, slave_id);
apr_pool_destroy(pool);
return NULL;
diff --git a/server/main.c b/server/main.c
index 351f0f1a56..da7e1d2512 100644
--- a/server/main.c
+++ b/server/main.c
@@ -735,6 +735,8 @@ int main(int argc, const char * const argv[])
apr_pool_clear(pconf);
ap_clear_auth_internal();
+ apr_sleep(apr_time_from_sec(10));
+
ap_main_state = AP_SQ_MS_CREATE_CONFIG;
ap_config_generation++;
for (mod = ap_prelinked_modules; *mod != NULL; mod++) {
diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c
index 151c920b0a..bd89d033f7 100644
--- a/server/mpm/event/event.c
+++ b/server/mpm/event/event.c
@@ -2135,7 +2135,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
ptrans);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_CRIT, rc,
- ap_server_conf, APLOGNO()
+ ap_server_conf, APLOGNO(10003)
"Failed to create transaction pool mutex");
ap_push_pool(worker_queue_info, ptrans);
signal_threads(ST_GRACEFUL);
diff --git a/server/mpm_unix.c b/server/mpm_unix.c
index cd3bc52d51..fb589fda2f 100644
--- a/server/mpm_unix.c
+++ b/server/mpm_unix.c
@@ -1015,14 +1015,13 @@ AP_DECLARE(apr_status_t) ap_fatal_signal_setup(server_rec *s,
#ifndef NO_USE_SIGACTION
struct sigaction sa;
+ memset(&sa, 0, sizeof sa);
sigemptyset(&sa.sa_mask);
#if defined(SA_ONESHOT)
sa.sa_flags = SA_ONESHOT;
#elif defined(SA_RESETHAND)
sa.sa_flags = SA_RESETHAND;
-#else
- sa.sa_flags = 0;
#endif
sa.sa_handler = sig_coredump;
diff --git a/server/request.c b/server/request.c
index 5336eb26d0..5bc3bf36c1 100644
--- a/server/request.c
+++ b/server/request.c
@@ -2040,8 +2040,10 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_sub_req_output_filter(ap_filter_t *f,
AP_CORE_DECLARE_NONSTD(apr_status_t) ap_request_core_filter(ap_filter_t *f,
apr_bucket_brigade *bb)
{
+ extern module http_module;
apr_bucket *flush_upto = NULL;
apr_status_t status = APR_SUCCESS;
+ http_conn_config *conn_cfg = ap_get_module_config(f->c->conn_config, &http_module);
apr_bucket_brigade *tmp_bb = f->ctx;
/*
@@ -2056,12 +2058,13 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_request_core_filter(ap_filter_t *f,
if (!tmp_bb) {
tmp_bb = f->ctx = apr_brigade_create(f->r->pool, f->c->bucket_alloc);
}
+ APR_BRIGADE_CONCAT(tmp_bb, bb);
/* Reinstate any buffered content */
- ap_filter_reinstate_brigade(f, bb, &flush_upto);
+ ap_filter_reinstate_brigade(f, tmp_bb, &flush_upto);
- while (!APR_BRIGADE_EMPTY(bb)) {
- apr_bucket *bucket = APR_BRIGADE_FIRST(bb);
+ while (!APR_BRIGADE_EMPTY(tmp_bb)) {
+ apr_bucket *bucket = APR_BRIGADE_FIRST(tmp_bb);
/* if the core has set aside data, back off and try later */
if (!flush_upto) {
@@ -2091,16 +2094,16 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_request_core_filter(ap_filter_t *f,
/* pass each bucket down the chain */
APR_BUCKET_REMOVE(bucket);
- APR_BRIGADE_INSERT_TAIL(tmp_bb, bucket);
+ APR_BRIGADE_INSERT_TAIL(bb, bucket);
+ status = ap_pass_brigade(f->next, bb);
+ apr_brigade_cleanup(bb);
- status = ap_pass_brigade(f->next, tmp_bb);
if (!APR_STATUS_IS_EOF(status) && (status != APR_SUCCESS)) {
return status;
}
-
}
- ap_filter_setaside_brigade(f, bb);
+ ap_filter_setaside_brigade(f, tmp_bb);
return status;
}