Skip to content

Commit

Permalink
mod_http2: optimization for c1 output passing when collecting
Browse files Browse the repository at this point in the history
           next DATA frame for a response.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910648 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
icing committed Jun 28, 2023
1 parent 2d8a447 commit 71269d0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions modules/http2/h2_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1429,10 +1429,17 @@ static ssize_t stream_data_cb(nghttp2_session *ng2s,
return NGHTTP2_ERR_DEFERRED;
}
if (h2_c1_io_needs_flush(&session->io)) {
ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c1,
H2_SSSN_STRM_MSG(session, stream_id, "suspending on c1 out needs flush"));
h2_stream_dispatch(stream, H2_SEV_OUT_C1_BLOCK);
return NGHTTP2_ERR_DEFERRED;
rv = h2_c1_io_pass(&session->io);
if (APR_STATUS_IS_EAGAIN(rv)) {
ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c1,
H2_SSSN_STRM_MSG(session, stream_id, "suspending on c1 out needs flush"));
h2_stream_dispatch(stream, H2_SEV_OUT_C1_BLOCK);
return NGHTTP2_ERR_DEFERRED;
}
else if (rv) {
h2_session_dispatch_event(session, H2_SESSION_EV_CONN_ERROR, rv, NULL);
return NGHTTP2_ERR_CALLBACK_FAILURE;
}
}

/* determine how much we'd like to send. We cannot send more than
Expand Down

0 comments on commit 71269d0

Please sign in to comment.