-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mod_http2: disabling mmap for file buckets transport due to segmenation
+ faults when files change on the fly.
+
*) mod_http2: new "bucket beam" technology to transport buckets across
threads without buffer copy. Delaying response start until flush or
enough body data has been accumulated. [Stefan Eissing]
#include <apr_thread_cond.h>
#include <httpd.h>
+#include <http_log.h>
+#include "h2_private.h"
#include "h2_util.h"
#include "h2_bucket_beam.h"
{
h2_bucket_beam *beam = data;
+ if (beam->live_beam_buckets) {
+ ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, beam->life_pool,
+ "h2_beam(%d-%s) cleanup with live %d buckets",
+ beam->id, beam->tag, (int)beam->live_beam_buckets);
+ }
AP_DEBUG_ASSERT(beam->live_beam_buckets == 0);
h2_blist_cleanup(&beam->red);
h2_blist_cleanup(&beam->purge);
apr_off_t readbytes)
{
apr_thread_mutex_t *lock;
- apr_bucket *bred, *bgreen;
+ apr_bucket *bred, *bgreen, *ng;
int acquired, transferred = 0;
apr_status_t status = APR_SUCCESS;
apr_off_t remain = readbytes;
}
++beam->files_beamed;
}
- apr_brigade_insert_file(bb, fd, bred->start, bred->length,
- bb->p);
+ ng = apr_brigade_insert_file(bb, fd, bred->start, bred->length,
+ bb->p);
+#if APR_HAS_MMAP
+ /* disable mmap handling as this leads to segfaults when
+ * the underlying file is changed while memory pointer has
+ * been handed out. See also PR 59348 */
+ apr_bucket_file_enable_mmap(ng, 0);
+#endif
remain -= bred->length;
++transferred;
}
/* continue reading handling */
}
else {
+ ap_log_cerror( APLOG_MARK, APLOG_TRACE1, status, c,
+ "h2_session(%ld): idle(1 sec timeout) "
+ "read failed", session->id);
dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 0, "error");
}
}
* @macro
* Version number of the http2 module as c string
*/
-#define MOD_HTTP2_VERSION "1.5.0-DEV"
+#define MOD_HTTP2_VERSION "1.5.1-DEV"
/**
* @macro
* release. This is a 24 bit number with 8 bits for major number, 8 bits
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
*/
-#define MOD_HTTP2_VERSION_NUM 0x010500
+#define MOD_HTTP2_VERSION_NUM 0x010501
#endif /* mod_h2_h2_version_h */