nginx-0.1.45-RELEASE import

    *) Change: the "ssl_engine" directive was canceled in the
       ngx_http_ssl_module and now is introduced at global level.

    *) Bugfix: the responses with SSI subrequests did not transferred via
       SSL connection.

    *) Various bug fixes in the IMAP/POP3 proxy.
diff --git a/auto/lib/openssl/conf b/auto/lib/openssl/conf
index e0da92a..c8c47e2 100644
--- a/auto/lib/openssl/conf
+++ b/auto/lib/openssl/conf
@@ -4,8 +4,6 @@
 
 if [ $OPENSSL != NONE ]; then
     CORE_INCS="$CORE_INCS $OPENSSL/include"
-    CORE_DEPS="$CORE_DEPS $OPENSSL_DEPS"
-    CORE_SRCS="$CORE_SRCS $OPENSSL_SRCS"
 
     case "$CC" in
         *)
@@ -36,8 +34,6 @@
         . auto/feature
 
         if [ $ngx_found = yes ]; then
-            CORE_DEPS="$CORE_DEPS $OPENSSL_DEPS"
-            CORE_SRCS="$CORE_SRCS $OPENSSL_SRCS"
             CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
             OPENSSL=YES
         fi
diff --git a/auto/make b/auto/make
index f304ac7..866fb34 100644
--- a/auto/make
+++ b/auto/make
@@ -124,7 +124,7 @@
 
 cat << END                                                >> $NGX_MAKEFILE
 
-ADDON_DEPS = \$(CORE_DPES) $NGX_ADDON_DEPS
+ADDON_DEPS = \$(CORE_DEPS) $NGX_ADDON_DEPS
 
 END
 
diff --git a/auto/modules b/auto/modules
index 606149a..46f356c 100644
--- a/auto/modules
+++ b/auto/modules
@@ -61,17 +61,22 @@
     HTTP_POSTPONE=YES
 fi
 
+# the module order is important
+#     ngx_http_autoindex_module
+#     ngx_http_index_module
+#
+#
 # the filter order is important
 #     ngx_http_write_filter
 #     ngx_http_header_filter
 #     ngx_http_chunked_filter
 #     ngx_http_range_header_filter
-#     ngx_http_ssl_filter
 #     ngx_http_gzip_filter
 #     ngx_http_postpone_filter
 #     ngx_http_charset_filter
 #     ngx_http_ssi_filter
-#     ngx_http_headers_filter
+#         ngx_http_userid_filter
+#         ngx_http_headers_filter
 #     ngx_http_copy_filter
 #     ngx_http_range_body_filter
 #     ngx_http_not_modified_filter
@@ -212,8 +217,23 @@
 fi
 
 
+if [ $IMAP_SSL = YES ]; then
+    IMAP_DEPS="$IMAP_DEPS $IMAP_SSL_DEPS"
+    IMAP_SRCS="$IMAP_SRCS $IMAP_SSL_SRCS"
+    have=NGX_IMAP_SSL . auto/have
+    USE_OPENSSL=YES
+fi
+
+
 modules="$CORE_MODULES $EVENT_MODULES"
 
+
+if [ $USE_OPENSSL = YES ]; then
+    modules="$modules $OPENSSL_MODULE"
+    CORE_DEPS="$CORE_DEPS $OPENSSL_DEPS"
+    CORE_SRCS="$CORE_SRCS $OPENSSL_SRCS"
+fi
+
 if [ $HTTP = YES ]; then
     modules="$modules $HTTP_MODULES $HTTP_FILTER_MODULES \
              $HTTP_HEADERS_FILTER_MODULE \
@@ -230,10 +250,6 @@
 
     if [ $IMAP_SSL = YES ]; then
         modules="$modules $IMAP_SSL_MODULE"
-        IMAP_DEPS="$IMAP_DEPS $IMAP_SSL_DEPS"
-        IMAP_SRCS="$IMAP_SRCS $IMAP_SSL_SRCS"
-        have=NGX_IMAP_SSL . auto/have
-        USE_OPENSSL=YES
     fi
 
     modules="$modules $IMAP_AUTH_HTTP_MODULE"
diff --git a/auto/sources b/auto/sources
index 806875d..bf04894 100644
--- a/auto/sources
+++ b/auto/sources
@@ -55,6 +55,11 @@
 REGEX_SRCS=src/core/ngx_regex.c
 
 
+OPENSSL_MODULE=ngx_openssl_module
+OPENSSL_DEPS=src/event/ngx_event_openssl.h
+OPENSSL_SRCS=src/event/ngx_event_openssl.c
+
+
 EVENT_MODULES="ngx_events_module ngx_event_core_module"
 
 EVENT_INCS="src/event src/event/modules"
@@ -104,10 +109,6 @@
           src/os/unix/ngx_aio_write_chain.c"
 
 
-OPENSSL_DEPS=src/event/ngx_event_openssl.h
-OPENSSL_SRCS=src/event/ngx_event_openssl.c
-
-
 UNIX_INCS="$CORE_INCS $EVENT_INCS src/os/unix"
 
 UNIX_DEPS="$CORE_DEPS $EVENT_DEPS \