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 2015/08/14 14:56:21 UTC

svn commit: r1695885 - in /httpd/httpd/trunk: docs/manual/mod/mod_h2.xml modules/http2/h2_config.c modules/http2/h2_config.h modules/http2/h2_switch.c

Author: icing
Date: Fri Aug 14 12:56:21 2015
New Revision: 1695885

URL: http://svn.apache.org/r1695885
Log:
removed H2Engine directive

Modified:
    httpd/httpd/trunk/docs/manual/mod/mod_h2.xml
    httpd/httpd/trunk/modules/http2/h2_config.c
    httpd/httpd/trunk/modules/http2/h2_config.h
    httpd/httpd/trunk/modules/http2/h2_switch.c

Modified: httpd/httpd/trunk/docs/manual/mod/mod_h2.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_h2.xml?rev=1695885&r1=1695884&r2=1695885&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_h2.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_h2.xml Fri Aug 14 12:56:21 2015
@@ -38,40 +38,6 @@
     </summary>
     
     <directivesynopsis>
-        <name>H2Engine</name>
-        <description>H2 Engine Operation Switch</description>
-        <syntax>H2Engine on|off</syntax>
-        <default>H2Engine off</default>
-        <contextlist>
-            <context>server config</context>
-            <context>virtual host</context>
-        </contextlist>
-        
-        <usage>
-            <p>
-                This directive toggles the usage of the HTTP/2 Protocol Engine. This
-                should be used inside a 
-                <directive module="core" type="section">VirtualHost</directive> 
-                section to enable HTTP/2 for that virtual host. By default the 
-                HTTP/2 Protocol Engine is disabled for both the main server and all 
-                configured virtual hosts.
-            </p>
-            <example><title>Example</title>
-                <highlight language="config">
-&lt;VirtualHost _default_:443&gt;
-    H2Engine on
-    #...
-&lt;/VirtualHost&gt;
-                </highlight>
-            </example>
-            <p>
-                The HTTP/2 engine is usable in TLS and plain scenarios, supporting
-                the 'h2' and 'h2c' variants of the protocol. 
-            </p>
-        </usage>
-    </directivesynopsis>
-    
-    <directivesynopsis>
         <name>H2Direct</name>
         <description>H2 Direct Protocol Switch</description>
         <syntax>H2Direct on|off</syntax>

Modified: httpd/httpd/trunk/modules/http2/h2_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_config.c?rev=1695885&r1=1695884&r2=1695885&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_config.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_config.c Fri Aug 14 12:56:21 2015
@@ -36,7 +36,6 @@
 
 static h2_config defconf = {
     "default",
-    0,                /* enabled */
     100,              /* max_streams */
     16 * 1024,        /* max_hl_size */
     64 * 1024,        /* window_size */
@@ -68,7 +67,6 @@ static void *h2_config_create(apr_pool_t
     strcat(name, "]");
     
     conf->name                 = name;
-    conf->h2_enabled           = DEF_VAL;
     conf->h2_max_streams       = DEF_VAL;
     conf->h2_max_hl_size       = DEF_VAL;
     conf->h2_window_size       = DEF_VAL;
@@ -113,7 +111,6 @@ void *h2_config_merge(apr_pool_t *pool,
     strcat(name, "]");
     n->name = name;
 
-    n->h2_enabled     = H2_CONFIG_GET(add, base, h2_enabled);
     n->h2_max_streams = H2_CONFIG_GET(add, base, h2_max_streams);
     n->h2_max_hl_size = H2_CONFIG_GET(add, base, h2_max_hl_size);
     n->h2_window_size = H2_CONFIG_GET(add, base, h2_window_size);
@@ -137,8 +134,6 @@ void *h2_config_merge(apr_pool_t *pool,
 int h2_config_geti(h2_config *conf, h2_config_var_t var)
 {
     switch(var) {
-        case H2_CONF_ENABLED:
-            return H2_CONFIG_GET(conf, &defconf, h2_enabled);
         case H2_CONF_MAX_STREAMS:
             return H2_CONFIG_GET(conf, &defconf, h2_max_streams);
         case H2_CONF_MAX_HL_SIZE:
@@ -183,23 +178,6 @@ h2_config *h2_config_sget(server_rec *s)
 }
 
 
-static const char *h2_conf_set_engine(cmd_parms *parms,
-                                      void *arg, const char *value)
-{
-    h2_config *cfg = h2_config_sget(parms->server);
-    if (!strcasecmp(value, "On")) {
-        cfg->h2_enabled = 1;
-        return NULL;
-    }
-    else if (!strcasecmp(value, "Off")) {
-        cfg->h2_enabled = 0;
-        return NULL;
-    }
-    
-    (void)arg;
-    return "value must be On or Off";
-}
-
 static const char *h2_conf_set_max_streams(cmd_parms *parms,
                                            void *arg, const char *value)
 {
@@ -425,8 +403,6 @@ static const char *h2_conf_set_buffer_ou
 
 #pragma GCC diagnostic ignored "-Wmissing-braces"
 const command_rec h2_cmds[] = {
-    AP_INIT_TAKE1("H2Engine", h2_conf_set_engine, NULL,
-                  RSRC_CONF, "on to enable HTTP/2 protocol handling"),
     AP_INIT_TAKE1("H2MaxSessionStreams", h2_conf_set_max_streams, NULL,
                   RSRC_CONF, "maximum number of open streams per session"),
     AP_INIT_TAKE1("H2WindowSize", h2_conf_set_window_size, NULL,

Modified: httpd/httpd/trunk/modules/http2/h2_config.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_config.h?rev=1695885&r1=1695884&r2=1695885&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_config.h (original)
+++ httpd/httpd/trunk/modules/http2/h2_config.h Fri Aug 14 12:56:21 2015
@@ -23,7 +23,6 @@
 #undef PACKAGE_BUGREPORT
 
 typedef enum {
-    H2_CONF_ENABLED,
     H2_CONF_MAX_STREAMS,
     H2_CONF_MAX_HL_SIZE,
     H2_CONF_WIN_SIZE,
@@ -45,7 +44,6 @@ typedef enum {
 /* Apache httpd module configuration for h2. */
 typedef struct h2_config {
     const char *name;
-    int h2_enabled;               /* if mod_h2 is active at all here */
     int h2_max_streams;           /* max concurrent # streams (http2) */
     int h2_max_hl_size;           /* max header list size (http2) */
     int h2_window_size;           /* stream window size (http2) */

Modified: httpd/httpd/trunk/modules/http2/h2_switch.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_switch.c?rev=1695885&r1=1695884&r2=1695885&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_switch.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_switch.c Fri Aug 14 12:56:21 2015
@@ -91,12 +91,6 @@ static int h2_protocol_propose(conn_rec
     
     cfg = h2_config_sget(s);
     
-    if (!h2_config_geti(cfg, H2_CONF_ENABLED)) {
-        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
-                      "protocol propose, h2 disabled for config %s", cfg->name);
-        return DECLINED;
-    }
-    
     if (r) {
         const char *p;
         /* So far, this indicates an HTTP/1 Upgrade header initiated