Commit 620aedfd authored by Stefan Eissing's avatar Stefan Eissing
Browse files

*) mod_http2: Configuration directoves H2Push and H2Upgrade can now be specified per

     Location/Directory, e.g. disabling PUSH for a specific set of resources. [Stefan Eissing]

  *) mod_http2: HEAD requests to some module such as mod_cgid caused the stream to
     terminate improperly and cause a HTTP/2 PROTOCOL_ERROR. 
     Fixes <https://github.com/icing/mod_h2/issues/167>. [Michael Kaufmann]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1852339 13f79535-47bb-0310-9956-ffa450edef68
parent 9e649edd
Loading
Loading
Loading
Loading
+7 −0
Changes for CHANGES: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
                                                         -*- coding: utf-8 -*-
Changes with Apache 2.5.1

  *) mod_http2: Configuration directoves H2Push and H2Upgrade can now be specified per 
     Location/Directory, e.g. disabling PUSH for a specific set of resources. [Stefan Eissing]

  *) mod_http2: HEAD requests to some module such as mod_cgid caused the stream to
     terminate improperly and cause a HTTP/2 PROTOCOL_ERROR. 
     Fixes <https://github.com/icing/mod_h2/issues/167>. [Michael Kaufmann]

  *) mod_ssl: give mod_md the chance to override certificate after ALPN protocol
     negotiation. [Stefan Eissing]

+10 −4
Changes for docs/manual/mod/mod_http2.xml: 10 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -244,6 +244,8 @@ H2Direct on
        <contextlist>
            <context>server config</context>
            <context>virtual host</context>
            <context>directory</context>
            <context>.htaccess</context>
        </contextlist>
        <compatibility>Available in version 2.4.18 and later.</compatibility>
        
@@ -269,7 +271,8 @@ H2Direct on
            </p>
            <p> 
                Link headers in responses are either set by the application or
                can be configured via <module>mod_headers</module> as:
                can be configured via <directive>H2PushResource</directive> or
                using <module>mod_headers</module> as:
            </p>
            <example><title>mod_headers example</title>
                <highlight language="config">
@@ -286,9 +289,10 @@ H2Direct on
                twice or more to one client. Use with care.
            </p>
            <p> 
                HTTP/2 server pushes are enabled by default. This directive 
                allows it to be switch off on all resources of this server/virtual
                host.
                HTTP/2 server pushes are enabled by default. On a server or virtual host,
                you may enable/disable this feature for any connection to the host. In addition,
                you may disable PUSH for a set of resources in a Directory/Location. This controls
                which resources may cause a PUSH, not which resources may be sent via PUSH.
            </p>
            <example><title>Example</title>
                <highlight language="config">
@@ -480,6 +484,8 @@ H2PushPriority text/css interleaved # weight 256 default
        <contextlist>
            <context>server config</context>
            <context>virtual host</context>
            <context>directory</context>
            <context>.htaccess</context>
        </contextlist>
        
        <usage>
+1 −0
Changes for modules/http2/h2.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -162,5 +162,6 @@ typedef int h2_stream_pri_cmp(int stream_id1, int stream_id2, void *ctx);
#define H2_FILTER_DEBUG_NOTE    "http2-debug"
#define H2_HDR_CONFORMANCE      "http2-hdr-conformance"
#define H2_HDR_CONFORMANCE_UNSAFE      "unsafe"
#define H2_PUSH_MODE_NOTE       "http2-push-mode"

#endif /* defined(__mod_h2__h2__) */
+6 −6
Changes for modules/http2/h2_alt_svc.c: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ h2_alt_svc *h2_alt_svc_parse(const char *s, apr_pool_t *pool)

static int h2_alt_svc_handler(request_rec *r)
{
    const h2_config *cfg;
    apr_array_header_t *alt_svcs;
    int i;
    
    if (r->connection->keepalives > 0) {
@@ -87,8 +87,8 @@ static int h2_alt_svc_handler(request_rec *r)
        return DECLINED;
    }
    
    cfg = h2_config_sget(r->server);
    if (r->hostname && cfg && cfg->alt_svcs && cfg->alt_svcs->nelts > 0) {
    alt_svcs = h2_config_alt_svcs(r);
    if (r->hostname && alt_svcs && alt_svcs->nelts > 0) {
        const char *alt_svc_used = apr_table_get(r->headers_in, "Alt-Svc-Used");
        if (!alt_svc_used) {
            /* We have alt-svcs defined and client is not already using
@@ -99,7 +99,7 @@ static int h2_alt_svc_handler(request_rec *r)
            const char *alt_svc = "";
            const char *svc_ma = "";
            int secure = h2_h2_is_tls(r->connection);
            int ma = h2_config_geti(cfg, H2_CONF_ALT_SVC_MAX_AGE);
            int ma = h2_config_rgeti(r, H2_CONF_ALT_SVC_MAX_AGE);
            if (ma >= 0) {
                svc_ma = apr_psprintf(r->pool, "; ma=%d", ma);
            }
@@ -107,8 +107,8 @@ static int h2_alt_svc_handler(request_rec *r)
                          "h2_alt_svc: announce %s for %s:%d", 
                          (secure? "secure" : "insecure"), 
                          r->hostname, (int)r->server->port);
            for (i = 0; i < cfg->alt_svcs->nelts; ++i) {
                h2_alt_svc *as = h2_alt_svc_IDX(cfg->alt_svcs, i);
            for (i = 0; i < alt_svcs->nelts; ++i) {
                h2_alt_svc *as = h2_alt_svc_IDX(alt_svcs, i);
                const char *ahost = as->host;
                if (ahost && !apr_strnatcasecmp(ahost, r->hostname)) {
                    ahost = NULL;
+434 −192

File changed.

Preview size limit exceeded, changes collapsed.

Loading