Skip to content

Commit

Permalink
* A regression in v1.15.24 was fixed that could lead to httpd child
Browse files Browse the repository at this point in the history
   processes not being terminated on a graceful reload or when reaching
   MaxConnectionsPerChild. When unprocessed h2 requests were queued at
   the time, these could stall. See #212.
  • Loading branch information
Stefan Eissing committed Nov 4, 2021
1 parent 17d8b04 commit a42ad0a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* A regression in v1.15.24 was fixed that could lead to httpd child
processes not being terminated on a graceful reload or when reaching
MaxConnectionsPerChild. When unprocessed h2 requests were queued at
the time, these could stall. See #212.
* Fixed an issue since 1.15.24 that "Server" headers in proxied requests
were overwritten instead of preserved. [PR by @daum3ns]

Expand Down
4 changes: 2 additions & 2 deletions mod_http2/h2_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ static int on_begin_headers_cb(nghttp2_session *ngh2,
const nghttp2_frame *frame, void *userp)
{
h2_session *session = (h2_session *)userp;
h2_stream *s;
h2_stream *s = NULL;

/* We may see HEADERs at the start of a stream or after all DATA
* streams to carry trailers. */
Expand All @@ -286,7 +286,7 @@ static int on_begin_headers_cb(nghttp2_session *ngh2,
if (s) {
/* nop */
}
else {
else if (session->local.accepting) {
s = h2_session_open_stream(userp, frame->hd.stream_id, 0);
}
return s? 0 : NGHTTP2_ERR_START_STREAM_NOT_ALLOWED;
Expand Down
2 changes: 0 additions & 2 deletions mod_http2/h2_workers.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,6 @@ apr_status_t h2_workers_unregister(h2_workers *workers, struct h2_mplx *m)
void h2_workers_graceful_shutdown(h2_workers *workers)
{
workers->shutdown = 1;
workers->min_workers = 1;
workers->max_idle_duration = apr_time_from_sec(1);
h2_fifo_term(workers->mplxs);
wake_non_essential_workers(workers);
}

0 comments on commit a42ad0a

Please sign in to comment.