Commit 73196dcd authored by Stefan Eissing's avatar Stefan Eissing
Browse files

Merge of 1752087,1752096,1752145,1753498,1753541 from trunk:

mod_http2: removed timeouts on master connection while reuqest are being processsed
mod_http2: new H2CopyFiles directive



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1753542 13f79535-47bb-0310-9956-ffa450edef68
parent caf7e5dd
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2,6 +2,14 @@

Changes with Apache 2.4.24

  *) mod_http2: new H2CopyFiles directive that changes treatment of file
     handles in responses. Necessary in order to fix broken lifetime handling
     in modules such as mod_wsgi.
  
  *) mod_http2: removing timeouts on master connection while requests are
     being processed. Requests may timeout, but the master only times out when
     no more requests are active. [Stefan Eissing]
     
  *) mod_http2: fixes connection flush when answering SETTINGS without any
     stream open. [Moto Ishizawa <@summerwind>, Stefan Eissing]
     
+37 −0
Original line number Diff line number Diff line
@@ -897,4 +897,41 @@ H2TLSCoolDownSecs 0
        </usage>
    </directivesynopsis>
    
    <directivesynopsis>
        <name>H2CopyFiles</name>
        <description>Determine file handling in responses</description>
        <syntax>H2CopyFiles on|off</syntax>
        <default>H2CopyFiles off</default>
        <contextlist>
            <context>server config</context>
            <context>virtual host</context>
            <context>directory</context>
            <context>.htaccess</context>
        </contextlist>
        <compatibility>Available in version 2.4.24 and later.</compatibility>
        
        <usage>
            <p>
                This directive influences how file content is handled in
                responses. When off, which is the default, file handles are 
                passed from the requestion processing down to the main
                connection, using the usual Apache setaside handling for
                manaaging the lifetime of the file.
            </p>
            <p>
                When set to <code>on</code>, file content is copied while the
                request is still being processed and the buffered data is passed
                on to the main connection. This is better if a third party
                module is injecting files with different lifetimes into the response. 
            </p>
            <p>
                An example for such a module is <code>mod_wsgi</code> that may place
                Python file handles into the response. Those files get close down when
                Python thinks processing has finished. That may be well before
                <code>mod_http2</code> is done with them.
            </p>
        </usage>
    </directivesynopsis>
    
    
</modulesynopsis>
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ static int h2_alt_svc_handler(request_rec *r)
        return DECLINED;
    }
    
    cfg = h2_config_rget(r);
    cfg = h2_config_sget(r->server);
    if (r->hostname && cfg && cfg->alt_svcs && cfg->alt_svcs->nelts > 0) {
        const char *alt_svc_used = apr_table_get(r->headers_in, "Alt-Svc-Used");
        if (!alt_svc_used) {
+5 −0
Original line number Diff line number Diff line
@@ -1013,3 +1013,8 @@ apr_size_t h2_beam_get_files_beamed(h2_bucket_beam *beam)
    return n;
}

int h2_beam_no_files(void *ctx, h2_bucket_beam *beam, apr_file_t *file)
{
    return 0;
}
+6 −0
Original line number Diff line number Diff line
@@ -163,6 +163,12 @@ typedef struct {
typedef int h2_beam_can_beam_callback(void *ctx, h2_bucket_beam *beam,
                                      apr_file_t *file);

/**
 * Will deny all transfer of apr_file_t across the beam and force
 * a data copy instead.
 */
int h2_beam_no_files(void *ctx, h2_bucket_beam *beam, apr_file_t *file);

struct h2_bucket_beam {
    int id;
    const char *tag;
Loading