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