nginx-0.0.1-2003-01-30-10:28:09 import
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index 56e2b5b..5396fa2 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1,8 +1,10 @@
 
 #include <ngx_config.h>
+
 #include <ngx_string.h>
 #include <ngx_socket.h>
 #include <ngx_listen.h>
+#include <ngx_inet.h>
 #include <ngx_http.h>
 #include <ngx_http_config.h>
 #include <ngx_http_core_module.h>
@@ -324,7 +326,7 @@
             ls->addr_text.len =
                 ngx_snprintf(ls->addr_text.data
                              + ngx_inet_ntop(AF_INET,
-                                             &in_addr[a].addr,
+                                             (char *) &in_addr[a].addr,
                                              ls->addr_text.data,
                                              INET_ADDRSTRLEN),
                              6, ":%d", in_port[p].port);
@@ -345,6 +347,7 @@
 
             ls->handler = ngx_http_init_connection;
             ls->log = cf->log;
+            ls->pool_size = ngx_http_connection_pool_size;
             ls->ctx = ctx;
             ls->servers = &in_port[p];
 
@@ -372,7 +375,7 @@
         in_addr = (ngx_http_in_addr_t *) in_port[p].addr.elts;
         for (a = 0; a < in_port[p].addr.nelts; a++) {
             char ip[20];
-            ngx_inet_ntop(AF_INET, &in_addr[a].addr, ip, 20);
+            ngx_inet_ntop(AF_INET, (char *) &in_addr[a].addr, ip, 20);
 ngx_log_debug(cf->log, "%s %08x" _ ip _ in_addr[a].core_srv_conf);
         }
     }
diff --git a/src/http/ngx_http_event.c b/src/http/ngx_http_event.c
index 26e67f8..6f7134a 100644
--- a/src/http/ngx_http_event.c
+++ b/src/http/ngx_http_event.c
@@ -16,12 +16,6 @@
 #include <ngx_http_config.h>
 #include <ngx_http_core_module.h>
 
-/* STUB */
-#include <ngx_http_output_filter.h>
-int ngx_http_static_handler(ngx_http_request_t *r);
-int ngx_http_index_handler(ngx_http_request_t *r);
-int ngx_http_proxy_handler(ngx_http_request_t *r);
-/**/
 
 int ngx_http_init_connection(ngx_connection_t *c);
 
@@ -41,13 +35,6 @@
 static int ngx_http_set_lingering_close(ngx_http_request_t *r);
 static int ngx_http_lingering_close_handler(ngx_event_t *ev);
 
-#if 0
-int ngx_http_special_response(ngx_http_request_t *r, int error);
-int ngx_http_redirect(ngx_http_request_t *r, int redirect);
-int ngx_http_error(ngx_http_request_t *r, int error);
-int ngx_http_close_request(ngx_http_request_t *r);
-#endif
-
 static int ngx_http_close_connection(ngx_event_t *ev);
 static size_t ngx_http_log_error(void *data, char *buf, size_t len);
 
@@ -76,34 +63,23 @@
 int ngx_http_init_connection(ngx_connection_t *c)
 {
     ngx_event_t         *ev;
-    struct sockaddr     *addr;
     ngx_http_log_ctx_t  *ctx;
 
     ev = c->read;
     ev->event_handler = ngx_http_init_request;
 
-    ngx_test_null(c->pool,
-                  ngx_create_pool(ngx_http_connection_pool_size, ev->log),
-                  NGX_ERROR);
-
-    ngx_test_null(c->requests, ngx_create_array(c->pool, 10, sizeof(char *)),
-                  NGX_ERROR);
-
     ev->close_handler = ngx_http_close_connection;
     c->write->close_handler = ngx_http_close_connection;
 
-    ngx_test_null(addr, ngx_palloc(c->pool, c->socklen), NGX_ERROR);
-    ngx_memcpy(addr, c->sockaddr, c->socklen);
-    c->sockaddr = addr;
-
     ngx_test_null(c->addr_text.data, ngx_palloc(c->pool, c->addr_text_max_len),
                   NGX_ERROR);
 
-    c->addr_text.len = ngx_inet_ntop(c->family,
-                                     (char *)c->sockaddr + c->addr,
+    c->addr_text.len = ngx_sock_ntop(c->family, c->sockaddr,
                                      c->addr_text.data, c->addr_text_max_len);
-    if (c->addr_text.len == 0)
-       return NGX_ERROR;
+
+    if (c->addr_text.len == 0) {
+        return NGX_ERROR;
+    }
 
     ngx_test_null(ctx, ngx_pcalloc(c->pool, sizeof(ngx_http_log_ctx_t)),
                   NGX_ERROR);
@@ -133,6 +109,15 @@
     }
 #endif
 
+#if (HAVE_EDGE_EVENT)
+    if (ngx_event_flags & NGX_HAVE_EDGE_EVENT) {
+        if (ngx_add_event(ev, NGX_READ_EVENT, NGX_EDGE_EVENT) == NGX_ERROR) {
+            return NGX_ERROR;
+        }
+        return ngx_http_init_request(ev);
+    }
+#endif
+
 #if (HAVE_AIO_EVENT)
     if (ngx_event_flags & NGX_HAVE_AIO_EVENT) {
         return ngx_http_init_request(ev);
@@ -147,8 +132,9 @@
 
 static int ngx_http_init_request(ngx_event_t *ev)
 {
-    ngx_connection_t    *c;
-    ngx_http_request_t  *r;
+    ngx_connection_t     *c;
+    ngx_http_request_t   *r;
+    ngx_http_conf_ctx_t  *ctx;
 
     c = (ngx_connection_t *) ev->data;
     c->sent = 0;
@@ -179,6 +165,10 @@
                   ngx_pcalloc(r->pool, sizeof(void *) * ngx_http_max_module),
                   ngx_http_close_request(r));
 
+    ctx = (ngx_http_conf_ctx_t *) c->ctx;
+    r->srv_conf = ctx->srv_conf;
+    r->loc_conf = ctx->loc_conf;
+
     r->headers_out.headers = ngx_create_table(r->pool, 10);
     r->headers_out.content_length = -1;
     r->headers_out.last_modified_time = -1;
@@ -195,7 +185,6 @@
     int  n, rc;
     ngx_connection_t    *c;
     ngx_http_request_t  *r;
-    ngx_http_log_ctx_t  *ctx;
 
     c = (ngx_connection_t *) ev->data;
     r = (ngx_http_request_t *) c->data;
@@ -283,8 +272,7 @@
 
 static int ngx_http_process_request_line(ngx_http_request_t *r)
 {
-    int     rc, len;
-    char  **request;
+    int                  rc;
     ngx_connection_t    *c;
     ngx_http_log_ctx_t  *ctx;
 
@@ -306,22 +294,6 @@
         ngx_cpystrn(r->request_line.data, r->header_in->start,
                     r->request_line.len + 1);
 
-        /* TEMP */
-        ngx_test_null(request, ngx_push_array(c->requests),
-                      ngx_http_close_request(r));
-
-        if (r->request_end)
-            len = r->request_end - r->header_in->start + 1;
-        else
-            len = 1;
-        c->requests_len += len;
-        ngx_test_null(*request, ngx_palloc(c->pool, len),
-                      ngx_http_close_request(r));
-        ngx_cpystrn(*request, r->header_in->start, len);
-
-        ngx_log_debug(c->log, "REQ: '%s'" _ *request);
-        /* */
-
         if (r->uri_ext) {
             r->exten.len = (r->args_start ? r->args_start - 1 : r->uri_end)
                                                                   - r->uri_ext;
@@ -764,13 +736,13 @@
 
     ngx_log_debug(ev->log, "http lingering close handler");
 
+    c = (ngx_connection_t *) ev->data;
+    r = (ngx_http_request_t *) c->data;
+
     if (ev->timedout) {
         return ngx_http_close_request(r);
     }
 
-    c = (ngx_connection_t *) ev->data;
-    r = (ngx_http_request_t *) c->data;
-
     timer = r->lingering_time - ngx_time();
     if (timer <= 0) {
         return ngx_http_close_request(r);
@@ -817,36 +789,8 @@
 
 static int ngx_http_close_connection(ngx_event_t *ev)
 {
-    int    i, len;
-    char **requests, *requests_line, *prev, *new;
     ngx_connection_t *c = (ngx_connection_t *) ev->data;
 
-    if (c->requests->nelts > 1) {
-        len = c->requests_len + c->requests->nelts * 2 - 1;
-
-        ngx_test_null(requests_line, ngx_palloc(c->pool, len),
-                      ngx_event_close_connection(ev));
-
-        requests = (char **) c->requests->elts;
-        prev = requests_line;
-        new = ngx_cpystrn(prev, requests[0], len);
-        len -= new - prev;
-        prev = new;
-
-        for (i = 1; i < c->requests->nelts; i++) { 
-            new = ngx_cpystrn(prev, ", ", len);
-            new = ngx_cpystrn(new, requests[i], len);
-            len -= new - prev;
-            prev = new;
-        }
-
-    } else {
-        requests_line = * (char **) c->requests->elts;
-    }
-
-    ngx_log_error(NGX_LOG_INFO, c->log, 0,
-                  "REQUESTS: %d, '%s'", c->requests->nelts, requests_line);
-
     return ngx_event_close_connection(ev);
 }
 
diff --git a/src/http/ngx_http_get_time.c b/src/http/ngx_http_get_time.c
index d03e8b1..c83a5ba 100644
--- a/src/http/ngx_http_get_time.c
+++ b/src/http/ngx_http_get_time.c
@@ -5,7 +5,7 @@
 #include <ngx_types.h>
 
 
-ngx_http_get_time(char *buf, time_t t)
+size_t ngx_http_get_time(char *buf, time_t t)
 {
     struct tm *tp;
 
diff --git a/src/http/ngx_http_header_filter.c b/src/http/ngx_http_header_filter.c
index 08369b7..282b82a 100644
--- a/src/http/ngx_http_header_filter.c
+++ b/src/http/ngx_http_header_filter.c
@@ -70,7 +70,7 @@
 
 static int ngx_http_header_filter(ngx_http_request_t *r)
 {
-    int  len, status, i;
+    int               len, status, i;
     time_t            ims;
     ngx_hunk_t       *h;
     ngx_chain_t      *ch;
@@ -106,6 +106,9 @@
     /* status line */
     if (r->headers_out.status_line.len) {
         len += r->headers_out.status_line.len;
+#if (NGX_SUPPRESS_WARN)
+        status = NGX_INVALID_ARRAY_INDEX;
+#endif
 
     } else {
         if (r->headers_out.status < NGX_HTTP_MOVED_PERMANENTLY) {
@@ -207,7 +210,8 @@
 
     /* 2^64 is 20 characters  */
     if (r->headers_out.content_length >= 0) {
-        h->last.mem += ngx_snprintf(h->last.mem, 49, "Content-Length: %u" CRLF,
+        h->last.mem += ngx_snprintf(h->last.mem, 49,
+                                    "Content-Length: " OFF_FMT CRLF,
                                     r->headers_out.content_length);
     }
 
diff --git a/src/http/ngx_http_output_filter.c b/src/http/ngx_http_output_filter.c
index 8b382e3..62756c8 100644
--- a/src/http/ngx_http_output_filter.c
+++ b/src/http/ngx_http_output_filter.c
@@ -59,12 +59,11 @@
 
 int ngx_http_output_filter(ngx_http_request_t *r, ngx_hunk_t *hunk)
 {
-    int      rc, once;
-    size_t   size;
-    ssize_t  n;
-    ngx_chain_t  *ce;
-    ngx_http_output_filter_ctx_t  *ctx;
-    ngx_http_output_filter_conf_t *conf;
+    int                             rc, once;
+    size_t                          size;
+    ngx_chain_t                    *ce;
+    ngx_http_output_filter_ctx_t   *ctx;
+    ngx_http_output_filter_conf_t  *conf;
 
     ctx = (ngx_http_output_filter_ctx_t *)
                     ngx_http_get_module_ctx(r->main ? r->main : r,
@@ -79,6 +78,10 @@
         ctx->last = 1;
     }
 
+#if (NGX_SUPPRESS_WARN)
+    rc = NGX_ALERT;
+#endif
+
     for (once = 1; once || ctx->in; once = 0) {
 
          /* input chain is not empty */
@@ -179,13 +182,12 @@
                     } else {
                         if (ctx->hunk == NULL) {
 
-                            if (hunk->type & NGX_HUNK_LAST) {
-
-                                conf = (ngx_http_output_filter_conf_t *)
+                            conf = (ngx_http_output_filter_conf_t *)
                                             ngx_http_get_module_loc_conf(
                                                 r->main ? r->main : r,
                                                 ngx_http_output_filter_module);
 
+                            if (hunk->type & NGX_HUNK_LAST) {
                                 size = hunk->last.mem - hunk->pos.mem;
                                 if (size > conf->hunk_size) {
                                     size = conf->hunk_size;
@@ -243,6 +245,14 @@
             ctx->hunk->pos.mem = ctx->hunk->last.mem = ctx->hunk->start;
     }
 
+#if (NGX_SUPPRESS_WARN)
+    if (rc == NGX_ALERT) {
+        ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
+                      "ngx_http_output_filter: rc == NGX_ALERT");
+        return NGX_ERROR;
+    }
+#endif
+
     if (rc == NGX_OK && ctx->last) {
         return NGX_OK;
     }
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c
index a741f09..f6d8409 100644
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -304,6 +304,11 @@
                 return NGX_HTTP_PARSE_INVALID_REQUEST;
             }
             break;
+
+#if (NGX_SUPPRESS_WARN)
+        case sw_done:
+            break;
+#endif
         }
     }
 
@@ -490,6 +495,14 @@
                 return NGX_HTTP_PARSE_INVALID_HEADER;
             }
             break;
+
+#if (NGX_SUPPRESS_WARN)
+        case sw_done:
+            break;
+
+        case sw_header_done:
+            break;
+#endif
         }
     }
 
diff --git a/src/http/ngx_http_parse_time.c b/src/http/ngx_http_parse_time.c
index c236fd5..09e56b4 100644
--- a/src/http/ngx_http_parse_time.c
+++ b/src/http/ngx_http_parse_time.c
@@ -20,6 +20,11 @@
     fmt = 0;
     end = value + len;
 
+#if (NGX_SUPPRESS_WARN)
+    day = 32;
+    year = 2038;
+#endif
+
     for (p = value; p < end; p++) {
         if (*p == ',') {
             break;