View | Details | Raw Unified | Return to bug 65731
Collapse All | Expand All

(-)a/modules/http2/h2_session.c (-3 / +12 lines)
Lines 275-281 static int on_begin_headers_cb(nghttp2_session *ngh2, Link Here
275
                               const nghttp2_frame *frame, void *userp)
275
                               const nghttp2_frame *frame, void *userp)
276
{
276
{
277
    h2_session *session = (h2_session *)userp;
277
    h2_session *session = (h2_session *)userp;
278
    h2_stream *s;
278
    h2_stream *s = NULL;
279
    
279
    
280
    /* We may see HEADERs at the start of a stream or after all DATA
280
    /* We may see HEADERs at the start of a stream or after all DATA
281
     * streams to carry trailers. */
281
     * streams to carry trailers. */
Lines 284-290 static int on_begin_headers_cb(nghttp2_session *ngh2, Link Here
284
    if (s) {
284
    if (s) {
285
        /* nop */
285
        /* nop */
286
    }
286
    }
287
    else {
287
    else if (session->local.accepting) {
288
        s = h2_session_open_stream(userp, frame->hd.stream_id, 0);
288
        s = h2_session_open_stream(userp, frame->hd.stream_id, 0);
289
    }
289
    }
290
    return s? 0 : NGHTTP2_ERR_START_STREAM_NOT_ALLOWED;
290
    return s? 0 : NGHTTP2_ERR_START_STREAM_NOT_ALLOWED;
Lines 2115-2121 apr_status_t h2_session_process(h2_session *session, int async) Link Here
2115
        now = apr_time_now();
2115
        now = apr_time_now();
2116
        session->have_read = session->have_written = 0;
2116
        session->have_read = session->have_written = 0;
2117
2117
2118
        if (session->local.accepting 
2118
        /* PR65731: we may get a new connection to process while the
2119
         * MPM already is stopping. For example due to having reached
2120
         * MaxRequestsPerChild limit.
2121
         * Since this is supposed to handle things gracefully, we need to:
2122
         * a) fully initialize the session before GOAWAYing
2123
         * b) give the client the chance to submit at least one request
2124
         */
2125
        if (session->state != H2_SESSION_ST_INIT /* no longer intializing */
2126
            && session->local.accepted_max > 0   /* have gotten at least one stream */
2127
            && session->local.accepting          /* have not already locally shut down */
2119
            && !ap_mpm_query(AP_MPMQ_MPM_STATE, &mpm_state)) {
2128
            && !ap_mpm_query(AP_MPMQ_MPM_STATE, &mpm_state)) {
2120
            if (mpm_state == AP_MPMQ_STOPPING) {
2129
            if (mpm_state == AP_MPMQ_STOPPING) {
2121
                dispatch_event(session, H2_SESSION_EV_MPM_STOPPING, 0, NULL);
2130
                dispatch_event(session, H2_SESSION_EV_MPM_STOPPING, 0, NULL);
(-)a/modules/http2/h2_version.h (-2 / +2 lines)
Lines 27-33 Link Here
27
 * @macro
27
 * @macro
28
 * Version number of the http2 module as c string
28
 * Version number of the http2 module as c string
29
 */
29
 */
30
#define MOD_HTTP2_VERSION "1.15.24"
30
#define MOD_HTTP2_VERSION "1.15.26"
31
31
32
/**
32
/**
33
 * @macro
33
 * @macro
Lines 35-41 Link Here
35
 * release. This is a 24 bit number with 8 bits for major number, 8 bits
35
 * release. This is a 24 bit number with 8 bits for major number, 8 bits
36
 * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
36
 * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
37
 */
37
 */
38
#define MOD_HTTP2_VERSION_NUM 0x010f18
38
#define MOD_HTTP2_VERSION_NUM 0x010f1a
39
39
40
40
41
#endif /* mod_h2_h2_version_h */
41
#endif /* mod_h2_h2_version_h */
(-)a/modules/http2/h2_workers.c (-2 lines)
Lines 479-486 apr_status_t h2_workers_unregister(h2_workers *workers, struct h2_mplx *m) Link Here
479
void h2_workers_graceful_shutdown(h2_workers *workers)
479
void h2_workers_graceful_shutdown(h2_workers *workers)
480
{
480
{
481
    workers->shutdown = 1;
481
    workers->shutdown = 1;
482
    workers->min_workers = 1;
483
    workers->max_idle_duration = apr_time_from_sec(1);
482
    workers->max_idle_duration = apr_time_from_sec(1);
484
    h2_fifo_term(workers->mplxs);
485
    wake_non_essential_workers(workers);
483
    wake_non_essential_workers(workers);
486
}
484
}

Return to bug 65731