summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2017-04-14 16:02:22 +0000
committerStefan Eissing <icing@apache.org>2017-04-14 16:02:22 +0000
commitc8598a912636278b446fcf0f5ffe8d822bda1315 (patch)
treeed391d04a96c75a66bbe2172e9ceb653ec2fbc6d
parentc66d4fc74ee76fcbb6c1494ae0dbb95d5bb4179f (diff)
downloadhttpd-c8598a912636278b446fcf0f5ffe8d822bda1315.tar.gz
On the trunk:
mod_http2: client streams that lack the EOF flag get now forcefully closed with a RST_STREAM (NO_ERROR) when the request has been answered. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1791388 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES4
-rw-r--r--docs/log-message-tags/next-number2
-rw-r--r--modules/http2/h2_mplx.c12
-rw-r--r--modules/http2/h2_session.c4
4 files changed, 18 insertions, 4 deletions
diff --git a/CHANGES b/CHANGES
index 12627a2fc2..9df60bb0f8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mod_http2: client streams that lack the EOF flag get now forcefully
+ closed with a RST_STREAM (NO_ERROR) when the request has been answered.
+ [Stefan Eissing]
+
*) mod_http2: only when 'HttpProtocolOptions Unsafe' is configured, will
control characters in response headers or trailers be forwarded to the
client. Otherwise, in the default configuration, a request will eiher
diff --git a/docs/log-message-tags/next-number b/docs/log-message-tags/next-number
index ac4e051f0a..41ec1d1fcc 100644
--- a/docs/log-message-tags/next-number
+++ b/docs/log-message-tags/next-number
@@ -1 +1 @@
-10024
+10027
diff --git a/modules/http2/h2_mplx.c b/modules/http2/h2_mplx.c
index 357bf5eaad..dbb74afd6b 100644
--- a/modules/http2/h2_mplx.c
+++ b/modules/http2/h2_mplx.c
@@ -258,7 +258,17 @@ static int input_consumed_signal(h2_mplx *m, h2_stream *stream)
static int report_consumption_iter(void *ctx, void *val)
{
- input_consumed_signal(ctx, val);
+ h2_stream *stream = val;
+ h2_mplx *m = ctx;
+
+ input_consumed_signal(m, stream);
+ if (stream->state == H2_SS_CLOSED_L
+ && (!stream->task || stream->task->worker_done)) {
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, m->c,
+ H2_STRM_LOG(APLOGNO(10026), stream, "remote close missing"));
+ nghttp2_submit_rst_stream(stream->session->ngh2, NGHTTP2_FLAG_NONE,
+ stream->id, NGHTTP2_NO_ERROR);
+ }
return 1;
}
diff --git a/modules/http2/h2_session.c b/modules/http2/h2_session.c
index 185580bf25..adece255ee 100644
--- a/modules/http2/h2_session.c
+++ b/modules/http2/h2_session.c
@@ -1294,7 +1294,7 @@ static apr_status_t on_stream_headers(h2_session *session, h2_stream *stream,
}
else {
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, session->c,
- H2_STRM_LOG(APLOGNO(), stream, "invalid trailers"));
+ H2_STRM_LOG(APLOGNO(10024), stream, "invalid trailers"));
h2_stream_rst(stream, NGHTTP2_PROTOCOL_ERROR);
}
goto leave;
@@ -1384,7 +1384,7 @@ static apr_status_t on_stream_headers(h2_session *session, h2_stream *stream,
}
else {
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, session->c,
- H2_STRM_LOG(APLOGNO(), stream, "invalid response"));
+ H2_STRM_LOG(APLOGNO(10025), stream, "invalid response"));
h2_stream_rst(stream, NGHTTP2_PROTOCOL_ERROR);
}
}