41a6c3
# ./pullrev.sh 1537535
41a6c3
41a6c3
http://svn.apache.org/viewvc?view=revision&revision=1537535
41a6c3
41a6c3
--- httpd-2.4.6/modules/ssl/ssl_engine_config.c.r1537535
41a6c3
+++ httpd-2.4.6/modules/ssl/ssl_engine_config.c
41a6c3
@@ -198,7 +198,7 @@ static SSLSrvConfigRec *ssl_config_serve
41a6c3
     SSLSrvConfigRec *sc = apr_palloc(p, sizeof(*sc));
41a6c3
 
41a6c3
     sc->mc                     = NULL;
41a6c3
-    sc->enabled                = SSL_ENABLED_FALSE;
41a6c3
+    sc->enabled                = SSL_ENABLED_UNSET;
41a6c3
     sc->proxy_enabled          = UNSET;
41a6c3
     sc->vhost_id               = NULL;  /* set during module init */
41a6c3
     sc->vhost_id_len           = 0;     /* set during module init */
41a6c3
--- httpd-2.4.6/modules/ssl/ssl_engine_init.c.r1537535
41a6c3
+++ httpd-2.4.6/modules/ssl/ssl_engine_init.c
41a6c3
@@ -289,13 +289,16 @@ int ssl_init_Module(apr_pool_t *p, apr_p
41a6c3
         sc->vhost_id = ssl_util_vhostid(p, s);
41a6c3
         sc->vhost_id_len = strlen(sc->vhost_id);
41a6c3
 
41a6c3
-        if (ap_get_server_protocol(s) &&
41a6c3
-            strcmp("https", ap_get_server_protocol(s)) == 0) {
41a6c3
+        /* Default to enabled if SSLEngine is not set explicitly, and
41a6c3
+         * the protocol is https. */
41a6c3
+        if (ap_get_server_protocol(s) 
41a6c3
+            && strcmp("https", ap_get_server_protocol(s)) == 0
41a6c3
+            && sc->enabled == SSL_ENABLED_UNSET) {
41a6c3
             sc->enabled = SSL_ENABLED_TRUE;
41a6c3
         }
41a6c3
 
41a6c3
-       /* If sc->enabled is UNSET, then SSL is optional on this vhost  */
41a6c3
-        /* Fix up stuff that may not have been set */
41a6c3
+        /* Fix up stuff that may not have been set.  If sc->enabled is
41a6c3
+         * UNSET, then SSL is disabled on this vhost.  */
41a6c3
         if (sc->enabled == SSL_ENABLED_UNSET) {
41a6c3
             sc->enabled = SSL_ENABLED_FALSE;
41a6c3
         }