diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-12 08:32:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-12 08:32:24 +0000 |
commit | 8391c6f3fe27e58aee67a1863284ab160ab430e9 (patch) | |
tree | d18e002a9dc765264e15ab64cc7c7a665bb45f76 /modules/http2/h2_session.c | |
parent | Releasing progress-linux version 2.4.58-1~progress7.99u1. (diff) | |
download | apache2-8391c6f3fe27e58aee67a1863284ab160ab430e9.tar.xz apache2-8391c6f3fe27e58aee67a1863284ab160ab430e9.zip |
Merging upstream version 2.4.59.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'modules/http2/h2_session.c')
-rw-r--r-- | modules/http2/h2_session.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/http2/h2_session.c b/modules/http2/h2_session.c index 1e560e4..5724fda 100644 --- a/modules/http2/h2_session.c +++ b/modules/http2/h2_session.c @@ -319,9 +319,13 @@ static int on_header_cb(nghttp2_session *ngh2, const nghttp2_frame *frame, status = h2_stream_add_header(stream, (const char *)name, namelen, (const char *)value, valuelen); - if (status != APR_SUCCESS - && (!stream->rtmp - || stream->rtmp->http_status == H2_HTTP_STATUS_UNSET)) { + if (status != APR_SUCCESS && + (!stream->rtmp || + stream->rtmp->http_status == H2_HTTP_STATUS_UNSET || + /* We accept a certain amount of failures in order to reply + * with an informative HTTP error response like 413. But if the + * client is too wrong, we fail the request a RESET of the stream */ + stream->request_headers_failed > 100)) { return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE; } return 0; |