You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2020/05/15 11:59:32 UTC

svn commit: r1877783 - in /httpd/httpd/trunk: CHANGES modules/http2/h2_conn.c modules/http2/h2_session.c modules/http2/h2_switch.c

Author: icing
Date: Fri May 15 11:59:32 2020
New Revision: 1877783

URL: http://svn.apache.org/viewvc?rev=1877783&view=rev
Log:
  *) mod_http2: Fixed regression that caused connections to close when mod_reqtimeout
     was configured with a handshake timeout. Fixes gitub issue #196.


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/http2/h2_conn.c
    httpd/httpd/trunk/modules/http2/h2_session.c
    httpd/httpd/trunk/modules/http2/h2_switch.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1877783&r1=1877782&r2=1877783&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Fri May 15 11:59:32 2020
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.1
 
+  *) mod_http2: Fixed regression that caused connections to close when mod_reqtimeout
+     was configured with a handshake timeout. Fixes gitub issue #196.
+     [Stefan Eissing]
+
   *) mod_proxy_http: handle Upgrade request, 101 (Switching Protocol) response
      and switched protocol forwarding.  [Yann Ylavic]
 

Modified: httpd/httpd/trunk/modules/http2/h2_conn.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_conn.c?rev=1877783&r1=1877782&r2=1877783&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_conn.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_conn.c Fri May 15 11:59:32 2020
@@ -187,6 +187,12 @@ apr_status_t h2_conn_setup(conn_rec *c,
     if (APR_SUCCESS == (status = h2_session_create(&session, c, r, s, workers))) {
         ctx = h2_ctx_get(c, 1);
         h2_ctx_session_set(ctx, session);
+
+        /* remove the input filter of mod_reqtimeout, now that the connection
+         * is established and we have swtiched to h2. reqtimeout has supervised
+         * possibly configured handshake timeouts and needs to get out of the way
+         * now since the rest of its state handling assumes http/1.x to take place. */
+        ap_remove_input_filter_byhandle(c->input_filters, "reqtimeout");
     }
     
     return status;

Modified: httpd/httpd/trunk/modules/http2/h2_session.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_session.c?rev=1877783&r1=1877782&r2=1877783&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_session.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_session.c Fri May 15 11:59:32 2020
@@ -1179,7 +1179,7 @@ struct h2_stream *h2_session_push(h2_ses
     stream = h2_session_open_stream(session, nid, is->id);
     if (!stream) {
         ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, 
-                      H2_STRM_LOG(APLOGNO(03077), stream, 
+                      H2_STRM_LOG(APLOGNO(03077), is,
                       "failed to create stream obj %d"), nid);
         /* kill the push_promise */
         nghttp2_submit_rst_stream(session->ngh2, NGHTTP2_FLAG_NONE, nid,

Modified: httpd/httpd/trunk/modules/http2/h2_switch.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_switch.c?rev=1877783&r1=1877782&r2=1877783&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_switch.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_switch.c Fri May 15 11:59:32 2020
@@ -159,7 +159,6 @@ static int h2_protocol_switch(conn_rec *
              * right away.
              */
             ap_remove_input_filter_byhandle(r->input_filters, "http_in");
-            ap_remove_input_filter_byhandle(r->input_filters, "reqtimeout");
             ap_remove_output_filter_byhandle(r->output_filters, "HTTP_HEADER");
             
             /* Ok, start an h2_conn on this one. */



Re: svn commit: r1877783 - in /httpd/httpd/trunk: CHANGES modules/http2/h2_conn.c modules/http2/h2_session.c modules/http2/h2_switch.c

Posted by Stefan Eissing <st...@greenbytes.de>.
> Am 15.05.2020 um 15:16 schrieb Ruediger Pluem <rp...@apache.org>:
> 
> 
> 
> On 5/15/20 1:59 PM, icing@apache.org wrote:
>> Author: icing
>> Date: Fri May 15 11:59:32 2020
>> New Revision: 1877783
>> 
>> URL: http://svn.apache.org/viewvc?rev=1877783&view=rev
>> Log:
>>  *) mod_http2: Fixed regression that caused connections to close when mod_reqtimeout
>>     was configured with a handshake timeout. Fixes gitub issue #196.
>> 
>> 
>> Modified:
>>    httpd/httpd/trunk/CHANGES
>>    httpd/httpd/trunk/modules/http2/h2_conn.c
>>    httpd/httpd/trunk/modules/http2/h2_session.c
>>    httpd/httpd/trunk/modules/http2/h2_switch.c
>> 
> 
>> Modified: httpd/httpd/trunk/modules/http2/h2_session.c
>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_session.c?rev=1877783&r1=1877782&r2=1877783&view=diff
>> ==============================================================================
>> --- httpd/httpd/trunk/modules/http2/h2_session.c (original)
>> +++ httpd/httpd/trunk/modules/http2/h2_session.c Fri May 15 11:59:32 2020
>> @@ -1179,7 +1179,7 @@ struct h2_stream *h2_session_push(h2_ses
>>     stream = h2_session_open_stream(session, nid, is->id);
>>     if (!stream) {
>>         ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, 
>> -                      H2_STRM_LOG(APLOGNO(03077), stream, 
>> +                      H2_STRM_LOG(APLOGNO(03077), is,
> 
> How does this relate to the change?

Sorry, was "offline" for a week. 

This change slipped in because of the synchronization between my github and apache subversion. I should have listed it in the description separately.


> 
>>                       "failed to create stream obj %d"), nid);
>>         /* kill the push_promise */
>>         nghttp2_submit_rst_stream(session->ngh2, NGHTTP2_FLAG_NONE, nid,
>> 
> 
> Regards
> 
> RĂ¼diger
> 


Re: svn commit: r1877783 - in /httpd/httpd/trunk: CHANGES modules/http2/h2_conn.c modules/http2/h2_session.c modules/http2/h2_switch.c

Posted by Ruediger Pluem <rp...@apache.org>.

On 5/15/20 1:59 PM, icing@apache.org wrote:
> Author: icing
> Date: Fri May 15 11:59:32 2020
> New Revision: 1877783
> 
> URL: http://svn.apache.org/viewvc?rev=1877783&view=rev
> Log:
>   *) mod_http2: Fixed regression that caused connections to close when mod_reqtimeout
>      was configured with a handshake timeout. Fixes gitub issue #196.
> 
> 
> Modified:
>     httpd/httpd/trunk/CHANGES
>     httpd/httpd/trunk/modules/http2/h2_conn.c
>     httpd/httpd/trunk/modules/http2/h2_session.c
>     httpd/httpd/trunk/modules/http2/h2_switch.c
> 

> Modified: httpd/httpd/trunk/modules/http2/h2_session.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_session.c?rev=1877783&r1=1877782&r2=1877783&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/http2/h2_session.c (original)
> +++ httpd/httpd/trunk/modules/http2/h2_session.c Fri May 15 11:59:32 2020
> @@ -1179,7 +1179,7 @@ struct h2_stream *h2_session_push(h2_ses
>      stream = h2_session_open_stream(session, nid, is->id);
>      if (!stream) {
>          ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, 
> -                      H2_STRM_LOG(APLOGNO(03077), stream, 
> +                      H2_STRM_LOG(APLOGNO(03077), is,

How does this relate to the change?

>                        "failed to create stream obj %d"), nid);
>          /* kill the push_promise */
>          nghttp2_submit_rst_stream(session->ngh2, NGHTTP2_FLAG_NONE, nid,
> 

Regards

RĂ¼diger