nginx-0.0.7-2004-06-16-19:32:11 import
diff --git a/src/http/modules/ngx_http_charset_filter.c b/src/http/modules/ngx_http_charset_filter.c
index b79a460..63ac0e1 100644
--- a/src/http/modules/ngx_http_charset_filter.c
+++ b/src/http/modules/ngx_http_charset_filter.c
@@ -128,7 +128,7 @@
 static ngx_http_output_body_filter_pt    ngx_http_next_body_filter;
 
 
-static int ngx_http_charset_header_filter(ngx_http_request_t *r)
+static ngx_int_t ngx_http_charset_header_filter(ngx_http_request_t *r)
 {
     ngx_http_charset_t            *charsets;
     ngx_http_charset_ctx_t        *ctx;
@@ -190,7 +190,8 @@
 }
 
 
-static int ngx_http_charset_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
+static ngx_int_t ngx_http_charset_body_filter(ngx_http_request_t *r,
+                                              ngx_chain_t *in)
 {
     char                          *table;
     ngx_chain_t                   *cl;
diff --git a/src/http/modules/ngx_http_chunked_filter.c b/src/http/modules/ngx_http_chunked_filter.c
index c429fa8..bd4c270 100644
--- a/src/http/modules/ngx_http_chunked_filter.c
+++ b/src/http/modules/ngx_http_chunked_filter.c
@@ -4,7 +4,7 @@
 #include <ngx_http.h>
 
 
-static int ngx_http_chunked_filter_init(ngx_cycle_t *cycle);
+static ngx_int_t ngx_http_chunked_filter_init(ngx_cycle_t *cycle);
 
 
 static ngx_http_module_t  ngx_http_chunked_filter_module_ctx = {
@@ -35,7 +35,7 @@
 static ngx_http_output_body_filter_pt    ngx_http_next_body_filter;
 
 
-static int ngx_http_chunked_header_filter(ngx_http_request_t *r)
+static ngx_int_t ngx_http_chunked_header_filter(ngx_http_request_t *r)
 {
     if (r->headers_out.status == NGX_HTTP_NOT_MODIFIED) {
         return ngx_http_next_header_filter(r);
@@ -54,7 +54,8 @@
 }
 
 
-static int ngx_http_chunked_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
+static ngx_int_t ngx_http_chunked_body_filter(ngx_http_request_t *r,
+                                              ngx_chain_t *in)
 {
     u_char       *chunk;
     size_t        size, len;
@@ -138,7 +139,7 @@
 }
 
 
-static int ngx_http_chunked_filter_init(ngx_cycle_t *cycle)
+static ngx_int_t ngx_http_chunked_filter_init(ngx_cycle_t *cycle)
 {
     ngx_http_next_header_filter = ngx_http_top_header_filter;
     ngx_http_top_header_filter = ngx_http_chunked_header_filter;
diff --git a/src/http/modules/ngx_http_gzip_filter.c b/src/http/modules/ngx_http_gzip_filter.c
index 0e02015..5f3825e 100644
--- a/src/http/modules/ngx_http_gzip_filter.c
+++ b/src/http/modules/ngx_http_gzip_filter.c
@@ -64,8 +64,8 @@
 } ngx_http_gzip_ctx_t;
 
 
-static int ngx_http_gzip_proxied(ngx_http_request_t *r,
-                                 ngx_http_gzip_conf_t *conf);
+static ngx_int_t ngx_http_gzip_proxied(ngx_http_request_t *r,
+                                       ngx_http_gzip_conf_t *conf);
 static void *ngx_http_gzip_filter_alloc(void *opaque, u_int items,
                                         u_int size);
 static void ngx_http_gzip_filter_free(void *opaque, void *address);
@@ -74,8 +74,8 @@
 static u_char *ngx_http_gzip_log_ratio(ngx_http_request_t *r, u_char *buf,
                                        uintptr_t data);
 
-static int ngx_http_gzip_pre_conf(ngx_conf_t *cf);
-static int ngx_http_gzip_filter_init(ngx_cycle_t *cycle);
+static ngx_int_t ngx_http_gzip_pre_conf(ngx_conf_t *cf);
+static ngx_int_t ngx_http_gzip_filter_init(ngx_cycle_t *cycle);
 static void *ngx_http_gzip_create_conf(ngx_conf_t *cf);
 static char *ngx_http_gzip_merge_conf(ngx_conf_t *cf,
                                       void *parent, void *child);
@@ -238,7 +238,7 @@
 static ngx_http_output_body_filter_pt    ngx_http_next_body_filter;
 
 
-static int ngx_http_gzip_header_filter(ngx_http_request_t *r)
+static ngx_int_t ngx_http_gzip_header_filter(ngx_http_request_t *r)
 {
     ngx_http_gzip_ctx_t   *ctx;
     ngx_http_gzip_conf_t  *conf;
@@ -288,10 +288,7 @@
      * hangs up or crashes
      */
 
-    if (r->headers_in.user_agent
-        && r->unparsed_uri.len > 200
-        && ngx_strstr(r->headers_in.user_agent->value.data, "MSIE 4"))
-    {
+    if (r->headers_in.msie4 && r->unparsed_uri.len > 200) {
         return ngx_http_next_header_filter(r);
     }
 
@@ -323,8 +320,8 @@
 }
 
 
-static int ngx_http_gzip_proxied(ngx_http_request_t *r,
-                                 ngx_http_gzip_conf_t *conf)
+static ngx_int_t ngx_http_gzip_proxied(ngx_http_request_t *r,
+                                       ngx_http_gzip_conf_t *conf)
 {
     time_t  date, expires;
 
@@ -403,7 +400,8 @@
 }
 
 
-static int ngx_http_gzip_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
+static ngx_int_t ngx_http_gzip_body_filter(ngx_http_request_t *r,
+                                           ngx_chain_t *in)
 {
     int                    rc, wbits, memlevel, last;
     struct gztrailer      *trailer;
@@ -819,7 +817,8 @@
     }
 
     return buf + ngx_snprintf((char *) buf, NGX_INT32_LEN + 4,
-                              "%d.%02d", zint, zfrac);
+                              "%" NGX_UINT_T_FMT ".%02" NGX_UINT_T_FMT,
+                              zint, zfrac);
 }
 
 
@@ -838,7 +837,7 @@
 }
 
 
-static int ngx_http_gzip_pre_conf(ngx_conf_t *cf)
+static ngx_int_t ngx_http_gzip_pre_conf(ngx_conf_t *cf)
 {
     ngx_http_log_op_name_t  *op;
 
@@ -859,7 +858,7 @@
 }
 
 
-static int ngx_http_gzip_filter_init(ngx_cycle_t *cycle)
+static ngx_int_t ngx_http_gzip_filter_init(ngx_cycle_t *cycle)
 {
     ngx_http_next_header_filter = ngx_http_top_header_filter;
     ngx_http_top_header_filter = ngx_http_gzip_header_filter;
@@ -894,9 +893,9 @@
     conf->http_version = NGX_CONF_UNSET_UINT;
 
     conf->level = NGX_CONF_UNSET;
-    conf->wbits = NGX_CONF_UNSET_UINT;
-    conf->memlevel = NGX_CONF_UNSET_UINT;
-    conf->min_length = NGX_CONF_UNSET_UINT;
+    conf->wbits = (size_t) NGX_CONF_UNSET;
+    conf->memlevel = (size_t) NGX_CONF_UNSET;
+    conf->min_length = NGX_CONF_UNSET;
 
     return conf;
 }
diff --git a/src/http/modules/ngx_http_headers_filter.c b/src/http/modules/ngx_http_headers_filter.c
index 560b5b1..7f74b47 100644
--- a/src/http/modules/ngx_http_headers_filter.c
+++ b/src/http/modules/ngx_http_headers_filter.c
@@ -14,7 +14,7 @@
 #define NGX_HTTP_EXPIRES_EPOCH   -2147483645
 
 
-static int ngx_http_headers_filter_init(ngx_cycle_t *cycle);
+static ngx_int_t ngx_http_headers_filter_init(ngx_cycle_t *cycle);
 static void *ngx_http_headers_create_conf(ngx_conf_t *cf);
 static char *ngx_http_headers_merge_conf(ngx_conf_t *cf,
                                          void *parent, void *child);
@@ -61,7 +61,7 @@
 static ngx_http_output_header_filter_pt  ngx_http_next_header_filter;
 
 
-static int ngx_http_headers_filter(ngx_http_request_t *r)
+static ngx_int_t ngx_http_headers_filter(ngx_http_request_t *r)
 {
     size_t                    len;
     ngx_table_elt_t          *expires, *cc;
@@ -145,7 +145,7 @@
 }
 
 
-static int ngx_http_headers_filter_init(ngx_cycle_t *cycle)
+static ngx_int_t ngx_http_headers_filter_init(ngx_cycle_t *cycle)
 {
     ngx_http_next_header_filter = ngx_http_top_header_filter;
     ngx_http_top_header_filter = ngx_http_headers_filter;
diff --git a/src/http/modules/ngx_http_index_handler.c b/src/http/modules/ngx_http_index_handler.c
index de609ac..80e4d19 100644
--- a/src/http/modules/ngx_http_index_handler.c
+++ b/src/http/modules/ngx_http_index_handler.c
@@ -29,7 +29,7 @@
 static ngx_int_t ngx_http_index_error(ngx_http_request_t *r,
                                       ngx_http_index_ctx_t *ctx, ngx_err_t err);
 
-static int ngx_http_index_init(ngx_cycle_t *cycle);
+static ngx_int_t ngx_http_index_init(ngx_cycle_t *cycle);
 static void *ngx_http_index_create_loc_conf(ngx_conf_t *cf);
 static char *ngx_http_index_merge_loc_conf(ngx_conf_t *cf,
                                        void *parent, void *child);
@@ -95,7 +95,7 @@
  * that path contains the usual file in place of the directory.
  */
 
-int ngx_http_index_handler(ngx_http_request_t *r)
+ngx_int_t ngx_http_index_handler(ngx_http_request_t *r)
 {
     u_char                     *name;
     ngx_fd_t                    fd;
@@ -361,7 +361,7 @@
 }
 
 
-static int ngx_http_index_init(ngx_cycle_t *cycle)
+static ngx_int_t ngx_http_index_init(ngx_cycle_t *cycle)
 {
     ngx_http_handler_pt        *h;
     ngx_http_conf_ctx_t        *ctx;
diff --git a/src/http/modules/ngx_http_not_modified_filter.c b/src/http/modules/ngx_http_not_modified_filter.c
index e1a961f..f14a78b 100644
--- a/src/http/modules/ngx_http_not_modified_filter.c
+++ b/src/http/modules/ngx_http_not_modified_filter.c
@@ -5,7 +5,7 @@
 
 
 
-static int ngx_http_not_modified_filter_init(ngx_cycle_t *cycle);
+static ngx_int_t ngx_http_not_modified_filter_init(ngx_cycle_t *cycle);
 
 
 static ngx_http_module_t  ngx_http_not_modified_filter_module_ctx = {
@@ -35,7 +35,7 @@
 static ngx_http_output_header_filter_pt  ngx_http_next_header_filter;
 
 
-static int ngx_http_not_modified_header_filter(ngx_http_request_t *r)
+static ngx_int_t ngx_http_not_modified_header_filter(ngx_http_request_t *r)
 {
     time_t  ims;
 
@@ -71,7 +71,7 @@
 }
 
 
-static int ngx_http_not_modified_filter_init(ngx_cycle_t *cycle)
+static ngx_int_t ngx_http_not_modified_filter_init(ngx_cycle_t *cycle)
 {
     ngx_http_next_header_filter = ngx_http_top_header_filter;
     ngx_http_top_header_filter = ngx_http_not_modified_header_filter;
diff --git a/src/http/modules/ngx_http_range_filter.c b/src/http/modules/ngx_http_range_filter.c
index 65a5fd0..8d3e3dd 100644
--- a/src/http/modules/ngx_http_range_filter.c
+++ b/src/http/modules/ngx_http_range_filter.c
@@ -339,7 +339,7 @@
             if (r->headers_out.charset.len) {
                 ctx->boundary_header.len =
                          ngx_snprintf((char *) ctx->boundary_header.data, len,
-                                      CRLF "--%010u" CRLF
+                                      CRLF "--%010" NGX_UINT_T_FMT CRLF
                                       "Content-Type: %s; charset=%s" CRLF
                                       "Content-Range: bytes ",
                                       boundary,
@@ -351,7 +351,7 @@
             } else {
                 ctx->boundary_header.len =
                          ngx_snprintf((char *) ctx->boundary_header.data, len,
-                                      CRLF "--%010u" CRLF
+                                      CRLF "--%010" NGX_UINT_T_FMT CRLF
                                       "Content-Type: %s" CRLF
                                       "Content-Range: bytes ",
                                       boundary,
@@ -368,7 +368,8 @@
                       ngx_snprintf((char *)
                                    r->headers_out.content_type->value.data,
                                    31 + 10 + 1,
-                                   "multipart/byteranges; boundary=%010u",
+                                   "multipart/byteranges; boundary=%010"
+                                   NGX_UINT_T_FMT,
                                    boundary);
 
             /* the size of the last boundary CRLF "--0123456789--" CRLF */
diff --git a/src/http/modules/proxy/ngx_http_proxy_handler.c b/src/http/modules/proxy/ngx_http_proxy_handler.c
index d523fc1..99ac1aa 100644
--- a/src/http/modules/proxy/ngx_http_proxy_handler.c
+++ b/src/http/modules/proxy/ngx_http_proxy_handler.c
@@ -5,7 +5,7 @@
 #include <ngx_http_proxy_handler.h>
 
 
-static int ngx_http_proxy_handler(ngx_http_request_t *r);
+static ngx_int_t ngx_http_proxy_handler(ngx_http_request_t *r);
 
 static u_char *ngx_http_proxy_log_proxy_state(ngx_http_request_t *r,
                                               u_char *buf, uintptr_t data);
@@ -14,7 +14,7 @@
 static u_char *ngx_http_proxy_log_reason(ngx_http_request_t *r, u_char *buf,
                                          uintptr_t data);
 
-static int ngx_http_proxy_pre_conf(ngx_conf_t *cf);
+static ngx_int_t ngx_http_proxy_pre_conf(ngx_conf_t *cf);
 static void *ngx_http_proxy_create_loc_conf(ngx_conf_t *cf);
 static char *ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf,
                                            void *parent, void *child);
@@ -307,7 +307,7 @@
 };
 
 
-static int ngx_http_proxy_handler(ngx_http_request_t *r)
+static ngx_int_t ngx_http_proxy_handler(ngx_http_request_t *r)
 {
     ngx_http_proxy_ctx_t  *p;
 
@@ -732,7 +732,8 @@
         *buf++ = '-';
 
     } else {
-        buf += ngx_snprintf((char *) buf, 4, "%d", p->state->status);
+        buf += ngx_snprintf((char *) buf, 4, "%" NGX_UINT_T_FMT,
+                            p->state->status);
     }
 
     *buf++ = '/';
@@ -796,7 +797,7 @@
 }
 
 
-static int ngx_http_proxy_pre_conf(ngx_conf_t *cf)
+static ngx_int_t ngx_http_proxy_pre_conf(ngx_conf_t *cf)
 {
     ngx_http_log_op_name_t  *op;