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 2018/10/10 11:35:49 UTC

svn commit: r1843426 - in /httpd/httpd/trunk: CHANGES modules/http2/h2_session.c modules/http2/h2_stream.c modules/http2/h2_version.h

Author: icing
Date: Wed Oct 10 11:35:48 2018
New Revision: 1843426

URL: http://svn.apache.org/viewvc?rev=1843426&view=rev
Log:
mod_http2: adding defensive code for stream EOS handling, in case the request handler
     missed to signal it the normal way (eos buckets). Addresses github issues 
     https://github.com/icing/mod_h2/issues/164, https://github.com/icing/mod_h2/issues/167
     and https://github.com/icing/mod_h2/issues/170. 


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/http2/h2_session.c
    httpd/httpd/trunk/modules/http2/h2_stream.c
    httpd/httpd/trunk/modules/http2/h2_version.h

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1843426&r1=1843425&r2=1843426&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed Oct 10 11:35:48 2018
@@ -1,6 +1,11 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.1
 
+  *) mod_http2: adding defensive code for stream EOS handling, in case the request handler
+     missed to signal it the normal way (eos buckets). Addresses github issues 
+     https://github.com/icing/mod_h2/issues/164, https://github.com/icing/mod_h2/issues/167
+     and https://github.com/icing/mod_h2/issues/170. [Stefan Eissing] 
+
   *) mod_proxy_scgi, mod_proxy_uwsgi: improve error handling when sending the
      body of the response. [Jim Jagielski]
 

Modified: httpd/httpd/trunk/modules/http2/h2_session.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_session.c?rev=1843426&r1=1843425&r2=1843426&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_session.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_session.c Wed Oct 10 11:35:48 2018
@@ -1097,6 +1097,10 @@ static ssize_t stream_data_cb(nghttp2_se
         case APR_SUCCESS:
             break;
             
+        case APR_EOF:
+            eos = 1;
+            break;
+            
         case APR_ECONNRESET:
         case APR_ECONNABORTED:
             return NGHTTP2_ERR_CALLBACK_FAILURE;

Modified: httpd/httpd/trunk/modules/http2/h2_stream.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_stream.c?rev=1843426&r1=1843425&r2=1843426&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_stream.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_stream.c Wed Oct 10 11:35:48 2018
@@ -919,7 +919,7 @@ apr_status_t h2_stream_out_prepare(h2_st
                           (long)*plen, *peos);
         }
         else {
-            status = APR_EAGAIN;
+            status = (stream->output && h2_beam_is_closed(stream->output))? APR_EOF : APR_EAGAIN;
             ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c,
                           H2_STRM_MSG(stream, "prepare, no data"));
         }

Modified: httpd/httpd/trunk/modules/http2/h2_version.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_version.h?rev=1843426&r1=1843425&r2=1843426&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_version.h (original)
+++ httpd/httpd/trunk/modules/http2/h2_version.h Wed Oct 10 11:35:48 2018
@@ -27,7 +27,7 @@
  * @macro
  * Version number of the http2 module as c string
  */
-#define MOD_HTTP2_VERSION "1.11.2-DEV"
+#define MOD_HTTP2_VERSION "1.11.3-DEV"
 
 /**
  * @macro
@@ -35,7 +35,7 @@
  * release. This is a 24 bit number with 8 bits for major number, 8 bits
  * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
  */
-#define MOD_HTTP2_VERSION_NUM 0x010b02
+#define MOD_HTTP2_VERSION_NUM 0x010b03
 
 
 #endif /* mod_h2_h2_version_h */