diff src/http/ngx_http.c @ 404:a094317ba307 NGINX_0_7_14

nginx 0.7.14 *) Change: now the ssl_certificate and ssl_certificate_key directives have not default values. *) Feature: the "listen" directive supports the "ssl" parameter. *) Feature: now nginx takes into account a time zone change while reconfiguration on FreeBSD and Linux. *) Bugfix: the "listen" directive parameters such as "backlog", "rcvbuf", etc. were not set, if a default server was not the first one. *) Bugfix: if URI part captured by a "rewrite" directive was used as a query string, then the query string was not escaped. *) Bugfix: configuration file validity test improvements.
author Igor Sysoev <http://sysoev.ru>
date Mon, 01 Sep 2008 00:00:00 +0400
parents 349057ecf4d5
children 79c5df00501e
line wrap: on
line diff
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1158,6 +1158,10 @@ ngx_http_init_server_lists(ngx_conf_t *c
 
                         in_addr[a].core_srv_conf = cscfp[s];
                         in_addr[a].default_server = 1;
+#if (NGX_HTTP_SSL)
+                        in_addr[a].ssl = listen[l].conf.ssl;
+#endif
+                        in_addr[a].listen_conf = &listen[l].conf;
                     }
 
                     goto found;
@@ -1241,17 +1245,11 @@ ngx_http_add_address(ngx_conf_t *cf, ngx
     in_addr->core_srv_conf = cscf;
     in_addr->default_server = listen->conf.default_server;
     in_addr->bind = listen->conf.bind;
+#if (NGX_HTTP_SSL)
+    in_addr->ssl = listen->conf.ssl;
+#endif
     in_addr->listen_conf = &listen->conf;
 
-#if (NGX_DEBUG)
-    {
-    u_char text[20];
-    ngx_inet_ntop(AF_INET, &in_addr->addr, text, 20);
-    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, cf->log, 0, "address: %s:%d",
-                   text, in_port->port);
-    }
-#endif
-
     return ngx_http_add_names(cf, cscf, in_addr);
 }
 
@@ -1656,6 +1654,10 @@ ngx_http_init_listening(ngx_conf_t *cf, 
             hip->addrs[i].addr = in_addr[i].addr;
             hip->addrs[i].core_srv_conf = in_addr[i].core_srv_conf;
 
+#if (NGX_HTTP_SSL)
+            hip->addrs[i].ssl = in_addr[i].ssl;
+#endif
+
             if (in_addr[i].hash.buckets == NULL
                 && (in_addr[i].wc_head == NULL
                     || in_addr[i].wc_head->hash.buckets == NULL)
@@ -1787,11 +1789,11 @@ ngx_http_merge_types(ngx_conf_t *cf, ngx
 
         if (prev_keys == NULL) {
 
-	    if (ngx_http_set_default_types(cf, &prev_keys, default_types)
+            if (ngx_http_set_default_types(cf, &prev_keys, default_types)
                 != NGX_OK)
             {
-		return NGX_CONF_ERROR;
-	    }
+                return NGX_CONF_ERROR;
+            }
         }
 
         hash.hash = prev_types_hash;