"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mod_http2/h2_task.c" between
mod_http2-1.15.14.tar.gz and mod_http2-1.15.16.tar.gz

About: mod_h[ttp]2 is an Apache httpd module implementing the HTTP2 protocol. It uses nghttp2 as base engine and connects it with the Apache infrastructure. Hint: Module (previous name "mod_h2") now integrated into Apache httpd (since v2.4.17). Experimental release.

h2_task.c  (mod_http2-1.15.14):h2_task.c  (mod_http2-1.15.16)
skipping to change at line 92 skipping to change at line 92
{ {
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, task->c, APLOGNO(03348) ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, task->c, APLOGNO(03348)
"h2_task(%s): open output to %s %s %s", "h2_task(%s): open output to %s %s %s",
task->id, task->request->method, task->id, task->request->method,
task->request->authority, task->request->authority,
task->request->path); task->request->path);
task->output.opened = 1; task->output.opened = 1;
return h2_mplx_t_out_open(task->mplx, task->stream_id, task->output.beam); return h2_mplx_t_out_open(task->mplx, task->stream_id, task->output.beam);
} }
static void output_consumed(void *ctx, h2_bucket_beam *beam, apr_off_t length)
{
h2_task *task = ctx;
if (task && h2_task_logio_add_bytes_out) {
h2_task_logio_add_bytes_out(task->c, length);
}
}
static apr_status_t send_out(h2_task *task, apr_bucket_brigade* bb, int block) static apr_status_t send_out(h2_task *task, apr_bucket_brigade* bb, int block)
{ {
apr_off_t written, left; apr_off_t written, left;
apr_status_t status; apr_status_t status;
apr_brigade_length(bb, 0, &written); apr_brigade_length(bb, 0, &written);
H2_TASK_OUT_LOG(APLOG_TRACE2, task, bb, "h2_task send_out"); H2_TASK_OUT_LOG(APLOG_TRACE2, task, bb, "h2_task send_out");
h2_beam_log(task->output.beam, task->c, APLOG_TRACE2, "send_out(before)"); h2_beam_log(task->output.beam, task->c, APLOG_TRACE2, "send_out(before)");
status = h2_beam_send(task->output.beam, bb, status = h2_beam_send(task->output.beam, bb,
block? APR_BLOCK_READ : APR_NONBLOCK_READ); block? APR_BLOCK_READ : APR_NONBLOCK_READ);
h2_beam_log(task->output.beam, task->c, APLOG_TRACE2, "send_out(after)"); h2_beam_log(task->output.beam, task->c, APLOG_TRACE2, "send_out(after)");
if (APR_STATUS_IS_EAGAIN(status)) { if (APR_STATUS_IS_EAGAIN(status)) {
apr_brigade_length(bb, 0, &left); apr_brigade_length(bb, 0, &left);
written -= left; written -= left;
status = APR_SUCCESS; status = APR_SUCCESS;
} }
if (status == APR_SUCCESS) { if (status == APR_SUCCESS) {
if (h2_task_logio_add_bytes_out) {
h2_task_logio_add_bytes_out(task->c, written);
}
ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, task->c, ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, task->c,
"h2_task(%s): send_out done", task->id); "h2_task(%s): send_out done", task->id);
} }
else { else {
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, task->c, ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, task->c,
"h2_task(%s): send_out (%ld bytes)", "h2_task(%s): send_out (%ld bytes)",
task->id, (long)written); task->id, (long)written);
} }
return status; return status;
} }
skipping to change at line 601 skipping to change at line 606
} }
h2_beam_create(&task->output.beam, c->pool, task->stream_id, "output", h2_beam_create(&task->output.beam, c->pool, task->stream_id, "output",
H2_BEAM_OWNER_SEND, 0, task->timeout); H2_BEAM_OWNER_SEND, 0, task->timeout);
if (!task->output.beam) { if (!task->output.beam) {
return APR_ENOMEM; return APR_ENOMEM;
} }
h2_beam_buffer_size_set(task->output.beam, task->output.max_buffer); h2_beam_buffer_size_set(task->output.beam, task->output.max_buffer);
h2_beam_send_from(task->output.beam, task->pool); h2_beam_send_from(task->output.beam, task->pool);
h2_beam_on_consumed(task->output.beam, NULL, output_consumed, task);
h2_ctx_create_for(c, task); h2_ctx_create_for(c, task);
apr_table_setn(c->notes, H2_TASK_ID_NOTE, task->id); apr_table_setn(c->notes, H2_TASK_ID_NOTE, task->id);
h2_secondary_run_pre_connection(c, ap_get_conn_socket(c)); h2_secondary_run_pre_connection(c, ap_get_conn_socket(c));
task->input.bb = apr_brigade_create(task->pool, c->bucket_alloc); task->input.bb = apr_brigade_create(task->pool, c->bucket_alloc);
if (task->request->serialize) { if (task->request->serialize) {
ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c, ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c,
"h2_task(%s): serialize request %s %s", "h2_task(%s): serialize request %s %s",
 End of changes. 3 change blocks. 
3 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)