diff src/http/ngx_http_request.c @ 165:894a01c6aea3

nginx-0.0.1-2003-10-29-20:39:05 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 29 Oct 2003 17:39:05 +0000
parents 84036764e215
children 389d7ee9fa60
line wrap: on
line diff
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -43,50 +43,6 @@ static char *client_header_errors[] = {
 };
 
 
-
-ngx_http_header_t ngx_http_headers_in[] = {
-    { ngx_string("Host"), offsetof(ngx_http_headers_in_t, host) },
-    { ngx_string("Connection"), offsetof(ngx_http_headers_in_t, connection) },
-    { ngx_string("If-Modified-Since"),
-                         offsetof(ngx_http_headers_in_t, if_modified_since) },
-    { ngx_string("User-Agent"), offsetof(ngx_http_headers_in_t, user_agent) },
-
-    { ngx_string("Content-Length"),
-                            offsetof(ngx_http_headers_in_t, content_length) },
-    { ngx_string("Accept-Encoding"),
-                           offsetof(ngx_http_headers_in_t, accept_encoding) },
-    { ngx_string("Range"), offsetof(ngx_http_headers_in_t, range) },
-#if 0
-    { ngx_string("If-Range"), offsetof(ngx_http_headers_in_t, if_range) },
-#endif
-
-    { ngx_string("Keep-Alive"), offsetof(ngx_http_headers_in_t, keep_alive) },
-
-    { ngx_null_string, 0 }
-};
-
-
-ngx_http_header_t ngx_http_headers_out[] = {
-    { ngx_string("Server"), offsetof(ngx_http_headers_out_t, server) },
-    { ngx_string("Date"), offsetof(ngx_http_headers_out_t, date) },
-    { ngx_string("Content-Type"),
-                             offsetof(ngx_http_headers_out_t, content_type) },
-    { ngx_string("Content-Length"),
-                           offsetof(ngx_http_headers_out_t, content_length) },
-    { ngx_string("Content-Encoding"),
-                         offsetof(ngx_http_headers_out_t, content_encoding) },
-
-    /* Location */
-
-    { ngx_string("Last-Modified"),
-                            offsetof(ngx_http_headers_out_t, last_modified) },
-    { ngx_string("Accept-Ranges"),
-                            offsetof(ngx_http_headers_out_t, accept_ranges) },
-
-    { ngx_null_string, 0 }
-};
-
-
 static void ngx_http_dummy(ngx_event_t *wev)
 {
     return;
@@ -271,7 +227,7 @@ ngx_log_debug(rev->log, "IN: %08x" _ in_
         return;
     }
 
-    r->headers_out.headers = ngx_create_table(r->pool, 1);
+    r->headers_out.headers = ngx_create_table(r->pool, 20);
     if (r->headers_out.headers == NULL) {
         ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
         ngx_http_close_connection(c);
@@ -466,7 +422,7 @@ static void ngx_http_process_request_lin
         lctx = c->log->data;
         lctx->action = "reading client request headers";
         lctx->url = r->unparsed_uri.data;
-        r->headers_in.headers = ngx_create_table(r->pool, 1);
+        r->headers_in.headers = ngx_create_table(r->pool, 20);
 
         if (cscf->large_client_header
             && r->header_in->pos == r->header_in->last)