]> granicus.if.org Git - apache/commitdiff
removed H2Engine directive
authorStefan Eissing <icing@apache.org>
Fri, 14 Aug 2015 12:56:21 +0000 (12:56 +0000)
committerStefan Eissing <icing@apache.org>
Fri, 14 Aug 2015 12:56:21 +0000 (12:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1695885 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_h2.xml
modules/http2/h2_config.c
modules/http2/h2_config.h
modules/http2/h2_switch.c

index 120041f919ce87e3de3e5aa91dd38ddab003f746..47a0e99c566fcbec4bdccc0c712b610b961dc370 100644 (file)
         
     </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>
index b038b5982f3d9b6999c2d8aa8f128942e956ab42..4a589f3243c42b276877fdbdbb68943d9e023572 100644 (file)
@@ -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 *pool,
     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, void *basev, void *addv)
     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, void *basev, void *addv)
 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_output(cmd_parms *parms,
 
 #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,
index 1ed0e58478de9ee78614ea35e20c9ec78e181956..2de6f876ca8d083dd7e0a68191dea30d56fc242c 100644 (file)
@@ -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) */
index 6a2f00934be24f1e9a8cb36d586f694a322830cd..2d521fc9396aeeaf99ba56a059e73b3710a1acaa 100644 (file)
@@ -91,12 +91,6 @@ static int h2_protocol_propose(conn_rec *c, request_rec *r,
     
     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