diff src/http/ngx_http.c @ 238:674f85a4d00f

nginx-0.0.1-2004-01-23-12:26:18 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 23 Jan 2004 09:26:18 +0000
parents 86e473b5641e
children b6793bc5034b
line wrap: on
line diff
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -243,8 +243,10 @@ static char *ngx_http_block(ngx_conf_t *
     cmcf->phases[NGX_HTTP_CONTENT_PHASE].type = NGX_OK;
 
 
-    /* create the lists of the ports, the addresses and the server names
-       to allow quickly find the server core module configuration at run-time */
+    /*
+     * create the lists of the ports, the addresses and the server names
+     * to allow quickly find the server core module configuration at run-time
+     */
 
     ngx_init_array(in_ports, cf->pool, 10, sizeof(ngx_http_in_port_t),
                    NGX_CONF_ERROR);
@@ -282,8 +284,10 @@ static char *ngx_http_block(ngx_conf_t *
                             s_name = cscfp[s]->server_names.elts;
                             for (n = 0; n < cscfp[s]->server_names.nelts; n++) {
 
-                                /* add the server name and server core module
-                                   configuration to the address:port */
+                                /*
+                                 * add the server name and server core module
+                                 * configuration to the address:port
+                                 */
 
                                 /* TODO: duplicate names can be checked here */
 
@@ -295,8 +299,10 @@ static char *ngx_http_block(ngx_conf_t *
                                 name->core_srv_conf = s_name[n].core_srv_conf;
                             }
 
-                            /* check duplicate "default" server that
-                               serves this address:port */
+                            /*
+                             * check duplicate "default" server that
+                             * serves this address:port
+                             */
 
                             if (lscf[l].flags & NGX_HTTP_DEFAULT_SERVER) {
                                 if (in_addr[a].flags
@@ -320,9 +326,11 @@ static char *ngx_http_block(ngx_conf_t *
 
                         } else if (in_addr[a].addr == INADDR_ANY) {
 
-                            /* "*:port" must be the last resort so move it
-                               to the end of the address list and add
-                               the new address at its place */
+                            /*
+                             * "*:port" must be the last resort so move it
+                             * to the end of the address list and add
+                             * the new address at its place
+                             */
 
                             ngx_test_null(inaddr,
                                           ngx_push_array(&in_port[p].addrs),
@@ -335,8 +343,10 @@ static char *ngx_http_block(ngx_conf_t *
                             in_addr[a].flags = lscf[l].flags;
                             in_addr[a].core_srv_conf = cscfp[s];
 
-                            /* create the empty list of the server names that
-                               can be served on this address:port */
+                            /*
+                             * create the empty list of the server names that
+                             * can be served on this address:port
+                             */
 
                             ngx_init_array(inaddr->names, cf->pool, 10,
                                            sizeof(ngx_http_server_name_t),
@@ -350,8 +360,10 @@ static char *ngx_http_block(ngx_conf_t *
 
                     if (!addr_found) {
 
-                        /* add the address to the addresses list that
-                           bound to this port */
+                        /*
+                         * add the address to the addresses list that
+                         * bound to this port
+                         */
 
                         ngx_test_null(inaddr,
                                       ngx_push_array(&in_port[p].addrs),
@@ -361,8 +373,10 @@ static char *ngx_http_block(ngx_conf_t *
                         inaddr->flags = lscf[l].flags;
                         inaddr->core_srv_conf = cscfp[s];
 
-                        /* create the empty list of the server names that
-                           can be served on this address:port */
+                        /*
+                         * create the empty list of the server names that
+                         * can be served on this address:port
+                         */
 
                         ngx_init_array(inaddr->names, cf->pool, 10,
                                        sizeof(ngx_http_server_name_t),
@@ -402,8 +416,10 @@ static char *ngx_http_block(ngx_conf_t *
                 inaddr->flags = lscf[l].flags;
                 inaddr->core_srv_conf = cscfp[s];
 
-                /* create the empty list of the server names that
-                   can be served on this address:port */
+                /*
+                 * create the empty list of the server names that
+                 * can be served on this address:port
+                 */
 
                 ngx_init_array(inaddr->names, cf->pool, 10,
                                sizeof(ngx_http_server_name_t),
@@ -434,16 +450,20 @@ static char *ngx_http_block(ngx_conf_t *
                 }
             }
 
-            /* if the all server names point to the same server
-               then we do not need to check them at run-time */
+            /*
+             * if the all server names point to the same server
+             * then we do not need to check them at run-time
+             */
 
             if (!virtual_names) {
                 in_addr[a].names.nelts = 0;
             }
         }
 
-        /* if there's the binding to "*:port" then we need to bind()
-           to "*:port" only and ignore the other bindings */
+        /*
+         * if there's the binding to "*:port" then we need to bind()
+         * to "*:port" only and ignore the other bindings
+         */
 
         if (in_addr[a - 1].addr == INADDR_ANY) {
             a--;
@@ -522,8 +542,10 @@ static char *ngx_http_block(ngx_conf_t *
                 in_addr = in_port[p].addrs.elts;
                 if (in_addr[in_port[p].addrs.nelts - 1].addr != INADDR_ANY) {
 
-                    /* if this port has not the "*:port" binding then create
-                       the separate ngx_http_in_port_t for the all bindings */
+                    /*
+                     * if this port has not the "*:port" binding then create
+                     * the separate ngx_http_in_port_t for the all bindings
+                     */
 
                     ngx_test_null(inport,
                                   ngx_palloc(cf->pool,