-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mod_http2: h2 status resource follows latest draft, see
+ http://www.ietf.org/id/draft-benfield-http2-debug-state-01.txt
+ [Stefan Eissing]
+
*) mod_http2: handling graceful shutdown gracefully, e.g. handling existing
streams to the end. [Stefan Eissing]
flowOut = nghttp2_session_get_stream_remote_window_size(x->s->ngh2, stream->id);
bbout(x->bb, "%s\n \"%d\": {\n", (x->idx? "," : ""), stream->id);
bbout(x->bb, " \"state\": \"%s\",\n", h2_stream_state_str(stream));
+ bbout(x->bb, " \"created\": %f,\n", ((double)stream->created)/APR_USEC_PER_SEC);
bbout(x->bb, " \"flowIn\": %d,\n", flowIn);
bbout(x->bb, " \"flowOut\": %d,\n", flowOut);
bbout(x->bb, " \"dataIn\": %"APR_UINT64_T_FMT",\n", stream->in_data_octets);
apr_itoa(stream->pool, connFlowOut));
bbout(bb, "{\n");
+ bbout(bb, " \"version\": \"draft-01\",\n");
add_settings(bb, s, 0);
add_peer_settings(bb, s, 0);
bbout(bb, " \"connFlowIn\": %d,\n", connFlowIn);
response->stream_id = stream_id;
response->http_status = status;
response->content_length = -1;
- response->headers = header;
+ response->headers = header? header : apr_table_make(pool, 5);
response->sos_filter = get_sos_filter(r->notes);
check_clen(response, r, pool);
h2_stream *stream = apr_pcalloc(pool, sizeof(h2_stream));
stream->id = id;
+ stream->created = apr_time_now();
stream->state = H2_STREAM_ST_IDLE;
stream->pool = pool;
stream->session = session;
struct h2_stream {
int id; /* http2 stream id */
+ apr_time_t created; /* when stream was created */
h2_stream_state_t state; /* http/2 state of this stream */
struct h2_session *session; /* the session this stream belongs to */
apr_status_t status;
AP_DEBUG_ASSERT(task);
- if (f->r->expecting_100) {
+ if (f->r->expecting_100 && ap_is_HTTP_SUCCESS(f->r->status)) {
h2_response *response;
response = h2_response_rcreate(task->stream_id, f->r, HTTP_CONTINUE,
- f->r->headers_out, f->r->pool);
+ NULL, f->r->pool);
ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, f->r,
"h2_task(%s): send 100 Continue", task->id);
status = open_response(task, response);