Skip to content

Commit

Permalink
copy of 2.4.x branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Eissing committed May 4, 2016
1 parent 0b248b6 commit f9b2970
Show file tree
Hide file tree
Showing 21 changed files with 850 additions and 682 deletions.
18 changes: 18 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
v1.5.3
--------------------------------------------------------------------------------
* slave connections have conn_rec->aborted flag set when a stream
has been reset by the client.
* Small fixes in bucket beams when forwarding file buckets. Output handling
on master connection uses less FLUSH and passes automatically when more
than half of H2StreamMaxMemSize bytes have accumulated.
Workaround for http: when forwarding partial file buckets to keep the
output filter from closing these too early.
* elimination of fixed master connectin buffer for TLS connections. New
scratch bucket handling optimized for TLS write sizes.
File bucket data read directly into scratch buffers, avoiding one
copy. Non-TLS connections continue to pass buckets unchanged to the core
filters to allow sendfile() usage.
* h2_request.c is no longer shared between these modules. This simplifies
building on platforms such as Windows, as module reference used in
logging is now clear.

v1.5.2
--------------------------------------------------------------------------------
* fixed connection shutdown deadlock on linux when client closed early
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#

AC_PREREQ([2.69])
AC_INIT([mod_http2], [1.5.2], [[email protected]])
AC_INIT([mod_http2], [1.5.3], [[email protected]])

LT_PREREQ([2.2.6])
LT_INIT()
Expand Down
20 changes: 17 additions & 3 deletions mod_http2/h2_bucket_beam.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,12 @@ apr_size_t h2_util_bl_print(char *buffer, apr_size_t bmax,

static apr_status_t enter_yellow(h2_bucket_beam *beam, h2_beam_lock *pbl)
{
if (beam->m_enter) {
return beam->m_enter(beam->m_ctx, pbl);
h2_beam_mutex_enter *enter = beam->m_enter;
if (enter) {
void *ctx = beam->m_ctx;
if (ctx) {
return enter(ctx, pbl);
}
}
pbl->mutex = NULL;
pbl->leave = NULL;
Expand Down Expand Up @@ -335,7 +339,7 @@ static void h2_beam_emitted(h2_bucket_beam *beam, h2_beam_proxy *proxy)
else {
/* it should be there unless we screwed up */
ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, beam->red_pool,
APLOGNO() "h2_beam(%d-%s): emitted bucket not "
APLOGNO(03384) "h2_beam(%d-%s): emitted bucket not "
"in hold, n=%d", beam->id, beam->tag,
(int)proxy->n);
AP_DEBUG_ASSERT(!proxy->bred);
Expand Down Expand Up @@ -535,6 +539,9 @@ apr_status_t h2_beam_shutdown(h2_bucket_beam *beam, apr_read_type_e block)
status = APR_EAGAIN;
break;
}
if (beam->m_cond) {
apr_thread_cond_broadcast(beam->m_cond);
}
status = wait_cond(beam, bl.mutex);
}
leave_yellow(beam, &bl);
Expand Down Expand Up @@ -716,6 +723,9 @@ apr_status_t h2_beam_receive(h2_bucket_beam *beam,
if (enter_yellow(beam, &bl) == APR_SUCCESS) {
transfer:
if (beam->aborted) {
if (!APR_BRIGADE_EMPTY(beam->green)) {
apr_brigade_cleanup(beam->green);
}
status = APR_ECONNABORTED;
goto leave;
}
Expand Down Expand Up @@ -781,6 +791,10 @@ apr_status_t h2_beam_receive(h2_bucket_beam *beam,
#endif
remain -= bred->length;
++transferred;
APR_BUCKET_REMOVE(bred);
H2_BLIST_INSERT_TAIL(&beam->hold, bred);
++transferred;
continue;
}
else {
/* create a "green" standin bucket. we took care about the
Expand Down
Loading

0 comments on commit f9b2970

Please sign in to comment.