diff src/http/ngx_http_request.h @ 50:72eb30262aac NGINX_0_1_25

nginx 0.1.25 *) Bugfix: nginx did run on Linux parisc. *) Feature: nginx now does not start under FreeBSD if the sysctl kern.ipc.somaxconn value is too big. *) Bugfix: if a request was internally redirected by the ngx_http_index_module module to the ngx_http_proxy_module or ngx_http_fastcgi_module modules, then the index file was not closed after request completion. *) Feature: the "proxy_pass" can be used in location with regular expression. *) Feature: the ngx_http_rewrite_filter_module module supports the condition like "if ($HTTP_USER_AGENT ~ MSIE)". *) Bugfix: nginx started too slow if the large number of addresses and text values were used in the "geo" directive. *) Change: a variable name must be declared as "$name" in the "geo" directive. The previous variant without "$" is still supported, but will be removed soon. *) Feature: the "%{VARIABLE}v" logging parameter. *) Feature: the "set $name value" directive. *) Bugfix: gcc 4.0 compatibility. *) Feature: the --with-openssl-opt=OPTIONS autoconfiguration directive.
author Igor Sysoev <http://sysoev.ru>
date Sat, 19 Mar 2005 00:00:00 +0300
parents 9f3205d496a0
children 0d75d65c642f
line wrap: on
line diff
--- a/src/http/ngx_http_request.h
+++ b/src/http/ngx_http_request.h
@@ -119,91 +119,91 @@ typedef enum {
 
 
 typedef struct {
-    ngx_str_t         name;
-    ngx_uint_t        offset;
+    ngx_str_t                         name;
+    ngx_uint_t                        offset;
 } ngx_http_header_t;
 
 
 typedef struct {
-    ngx_list_t        headers;
+    ngx_list_t                        headers;
 
-    ngx_table_elt_t  *host;
-    ngx_table_elt_t  *connection;
-    ngx_table_elt_t  *if_modified_since;
-    ngx_table_elt_t  *user_agent;
-    ngx_table_elt_t  *referer;
-    ngx_table_elt_t  *content_length;
-    ngx_table_elt_t  *content_type;
+    ngx_table_elt_t                  *host;
+    ngx_table_elt_t                  *connection;
+    ngx_table_elt_t                  *if_modified_since;
+    ngx_table_elt_t                  *user_agent;
+    ngx_table_elt_t                  *referer;
+    ngx_table_elt_t                  *content_length;
+    ngx_table_elt_t                  *content_type;
 
-    ngx_table_elt_t  *range;
+    ngx_table_elt_t                  *range;
 
 #if (NGX_HTTP_GZIP)
-    ngx_table_elt_t  *accept_encoding;
-    ngx_table_elt_t  *via;
+    ngx_table_elt_t                  *accept_encoding;
+    ngx_table_elt_t                  *via;
 #endif
 
-    ngx_table_elt_t  *authorization;
+    ngx_table_elt_t                  *authorization;
 
-    ngx_table_elt_t  *keep_alive;
+    ngx_table_elt_t                  *keep_alive;
 
 #if (NGX_HTTP_PROXY)
-    ngx_table_elt_t  *x_forwarded_for;
-    ngx_table_elt_t  *x_real_ip;
-    ngx_table_elt_t  *x_url;
+    ngx_table_elt_t                  *x_forwarded_for;
+    ngx_table_elt_t                  *x_real_ip;
+    ngx_table_elt_t                  *x_url;
 #endif
 
 #if (NGX_HTTP_HEADERS)
-    ngx_table_elt_t  *accept;
-    ngx_table_elt_t  *accept_language;
+    ngx_table_elt_t                  *accept;
+    ngx_table_elt_t                  *accept_language;
 #endif
 
-    ngx_array_t       cookies;
+    ngx_array_t                       cookies;
+
+    size_t                            host_name_len;
+    ssize_t                           content_length_n;
+    time_t                            keep_alive_n;
 
-    size_t            host_name_len;
-    ssize_t           content_length_n;
-    size_t            connection_type;
-    ssize_t           keep_alive_n;
-
-    unsigned          msie:1;
-    unsigned          msie4:1;
-    unsigned          opera:1;
-    unsigned          gecko:1;
-    unsigned          konqueror:1;
+    unsigned                          connection_type:2;
+    unsigned                          msie:1;
+    unsigned                          msie4:1;
+    unsigned                          opera:1;
+    unsigned                          gecko:1;
+    unsigned                          konqueror:1;
 } ngx_http_headers_in_t;
 
 
 typedef struct {
-    off_t             start;
-    off_t             end;
-    ngx_str_t         content_range;
+    off_t                             start;
+    off_t                             end;
+    ngx_str_t                         content_range;
 } ngx_http_range_t;
 
 
 typedef struct {
-    ngx_list_t        headers;
+    ngx_list_t                        headers;
 
-    ngx_uint_t        status;
-    ngx_str_t         status_line;
+    ngx_uint_t                        status;
+    ngx_str_t                         status_line;
 
-    ngx_table_elt_t  *server;
-    ngx_table_elt_t  *date;
-    ngx_table_elt_t  *content_type;
-    ngx_table_elt_t  *content_length;
-    ngx_table_elt_t  *content_encoding;
-    ngx_table_elt_t  *location;
-    ngx_table_elt_t  *last_modified;
-    ngx_table_elt_t  *content_range;
-    ngx_table_elt_t  *accept_ranges;
-    ngx_table_elt_t  *expires;
-    ngx_table_elt_t  *cache_control;
-    ngx_table_elt_t  *etag;
+    ngx_table_elt_t                  *server;
+    ngx_table_elt_t                  *date;
+    ngx_table_elt_t                  *content_type;
+    ngx_table_elt_t                  *content_length;
+    ngx_table_elt_t                  *content_encoding;
+    ngx_table_elt_t                  *location;
+    ngx_table_elt_t                  *last_modified;
+    ngx_table_elt_t                  *content_range;
+    ngx_table_elt_t                  *accept_ranges;
+    ngx_table_elt_t                  *expires;
+    ngx_table_elt_t                  *cache_control;
+    ngx_table_elt_t                  *etag;
 
-    ngx_str_t         charset;
-    ngx_array_t       ranges;
+    ngx_str_t                         charset;
+    ngx_array_t                       ranges;
 
-    off_t             content_length_n;
-    time_t            date_time;
-    time_t            last_modified_time;
+    off_t                             content_length_n;
+    time_t                            date_time;
+    time_t                            last_modified_time;
 } ngx_http_headers_out_t;
 
 
@@ -221,172 +221,171 @@ typedef struct {
 struct ngx_http_cleanup_s {
     union {
         struct {
-            ngx_fd_t                 fd;
-            u_char                  *name;
+            ngx_fd_t                  fd;
+            u_char                   *name;
         } file;
 
         struct {
-            ngx_http_cache_hash_t   *hash;
-            ngx_http_cache_entry_t  *cache;
+            ngx_http_cache_hash_t    *hash;
+            ngx_http_cache_entry_t   *cache;
         } cache;
     } data;
 
-    unsigned                         valid:1;
-    unsigned                         cache:1;
+    unsigned                          valid:1;
+    unsigned                          cache:1;
 };
 
 
 typedef struct {
-    ngx_http_request_t   *request;
+    ngx_http_request_t               *request;
 
-    ngx_buf_t           **busy;
-    ngx_int_t             nbusy;
+    ngx_buf_t                       **busy;
+    ngx_int_t                         nbusy;
 
-    ngx_buf_t           **free;
-    ngx_int_t             nfree;
+    ngx_buf_t                       **free;
+    ngx_int_t                         nfree;
 
-    ngx_uint_t            pipeline;      /* unsigned  pipeline:1; */
+    ngx_uint_t                        pipeline;    /* unsigned  pipeline:1; */
 } ngx_http_connection_t;
 
 
 typedef ngx_int_t (*ngx_http_handler_pt)(ngx_http_request_t *r);
 
 struct ngx_http_request_s {
-    uint32_t                  signature;         /* "HTTP" */
+    uint32_t                          signature;         /* "HTTP" */
 
-    ngx_connection_t         *connection;
+    ngx_connection_t                 *connection;
 
-    void                    **ctx;
-    void                    **main_conf;
-    void                    **srv_conf;
-    void                    **loc_conf;
+    void                            **ctx;
+    void                            **main_conf;
+    void                            **srv_conf;
+    void                            **loc_conf;
 
-    ngx_http_cache_t         *cache;
+    ngx_http_cache_t                 *cache;
 
-    ngx_http_upstream_t      *upstream;
+    ngx_http_upstream_t              *upstream;
 
-    ngx_file_t                file;
+    ngx_file_t                        file;
 
-    ngx_pool_t               *pool;
-    ngx_buf_t                *header_in;
+    ngx_pool_t                       *pool;
+    ngx_buf_t                        *header_in;
 
-    ngx_http_headers_in_t     headers_in;
-    ngx_http_headers_out_t    headers_out;
+    ngx_http_headers_in_t             headers_in;
+    ngx_http_headers_out_t            headers_out;
 
-    ngx_http_request_body_t  *request_body;
+    ngx_http_request_body_t          *request_body;
 
-    time_t                    lingering_time;
-    time_t                    start_time;
+    time_t                            lingering_time;
+    time_t                            start_time;
 
-    ngx_uint_t           method;
-    ngx_uint_t           http_version;
-    ngx_uint_t           http_major;
-    ngx_uint_t           http_minor;
-
-    ngx_str_t            request_line;
-    ngx_str_t            uri;
-    ngx_str_t            args;
-    ngx_str_t            exten;
-    ngx_str_t            unparsed_uri;
-
-    ngx_str_t            method_name;
-    ngx_str_t            http_protocol;
+    ngx_uint_t                        method;
+    ngx_uint_t                        http_version;
+    ngx_uint_t                        http_major;
+    ngx_uint_t                        http_minor;
+ 
+    ngx_str_t                         request_line;
+    ngx_str_t                         uri;
+    ngx_str_t                         args;
+    ngx_str_t                         exten;
+    ngx_str_t                         unparsed_uri;
 
-    ngx_http_request_t  *main;
-
-    uint32_t             in_addr;
-    ngx_uint_t           port;
-    ngx_str_t           *port_text;    /* ":80" */
-    ngx_str_t            server_name;
-    ngx_http_in_addr_t  *virtual_names;
+    ngx_str_t                         method_name;
+    ngx_str_t                         http_protocol;
+ 
+    ngx_http_request_t               *main;
 
-    ngx_uint_t           phase;
-    ngx_int_t            phase_handler;
-    ngx_http_handler_pt  content_handler;
+    uint32_t                          in_addr;
+    ngx_uint_t                        port;
+    ngx_str_t                        *port_text;    /* ":80" */
+    ngx_str_t                         server_name;
+    ngx_http_in_addr_t               *virtual_names;
 
-    ngx_uint_t           nvariables;
-    void               **variables;
+    ngx_uint_t                        phase;
+    ngx_int_t                         phase_handler;
+    ngx_http_handler_pt               content_handler;
 
-    ngx_array_t          cleanup;
+    ngx_http_variable_value_t       **variables;
+
+    ngx_array_t                       cleanup;
 
     /* used to learn the Apache compatible response length without a header */
-    size_t               header_size;
+    size_t                            header_size;
 
-    size_t               request_length;
+    size_t                            request_length;
 
-    u_char              *discarded_buffer;
-    void               **err_ctx;
-    ngx_uint_t           err_status;
+    u_char                           *discarded_buffer;
+    void                            **err_ctx;
+    ngx_uint_t                        err_status;
 
-    ngx_http_connection_t  *http_connection;
+    ngx_http_connection_t            *http_connection;
 
-    unsigned             http_state:4;
+    unsigned                          http_state:4;
 
     /* URI with "/." and on Win32 with "//" */
-    unsigned             complex_uri:1;
+    unsigned                          complex_uri:1;
 
     /* URI with "%" */
-    unsigned             quoted_uri:1;
+    unsigned                          quoted_uri:1;
 
     /* URI with "+" */
-    unsigned             plus_in_uri:1;
+    unsigned                          plus_in_uri:1;
 
     /* URI with "\0" or "%00" */
-    unsigned             zero_in_uri:1;
+    unsigned                          zero_in_uri:1;
 
-    unsigned             uri_changed:1;
-    unsigned             uri_changes:4;
+    unsigned                          uri_changed:1;
+    unsigned                          uri_changes:4;
 
-    unsigned             low_case_exten:1;
-    unsigned             header_timeout_set:1;
+    unsigned                          low_case_exten:1;
+    unsigned                          header_timeout_set:1;
 
-    unsigned             proxy:1;
-    unsigned             bypass_cache:1;
-    unsigned             no_cache:1;
+    unsigned                          proxy:1;
+    unsigned                          bypass_cache:1;
+    unsigned                          no_cache:1;
 
 #if 0
-    unsigned             cachable:1;
+    unsigned                          cachable:1;
 #endif
-    unsigned             pipeline:1;
+    unsigned                          pipeline:1;
 
-    unsigned             plain_http:1;
-    unsigned             chunked:1;
-    unsigned             header_only:1;
-    unsigned             keepalive:1;
-    unsigned             lingering_close:1;
-    unsigned             closed:1;
+    unsigned                          plain_http:1;
+    unsigned                          chunked:1;
+    unsigned                          header_only:1;
+    unsigned                          keepalive:1;
+    unsigned                          lingering_close:1;
+    unsigned                          closed:1;
 
-    unsigned             filter_need_in_memory:1;
-    unsigned             filter_ssi_need_in_memory:1;
-    unsigned             filter_need_temporary:1;
-    unsigned             filter_allow_ranges:1;
+    unsigned                          filter_need_in_memory:1;
+    unsigned                          filter_ssi_need_in_memory:1;
+    unsigned                          filter_need_temporary:1;
+    unsigned                          filter_allow_ranges:1;
 
 #if (NGX_STAT_STUB)
-    unsigned             stat_reading:1;
-    unsigned             stat_writing:1;
+    unsigned                          stat_reading:1;
+    unsigned                          stat_writing:1;
 #endif
 
-    ngx_uint_t           headers_n;
+    ngx_uint_t                        headers_n;
 
     /* used to parse HTTP headers */
-    ngx_uint_t           state;
-    u_char              *uri_start;
-    u_char              *uri_end;
-    u_char              *uri_ext;
-    u_char              *args_start;
-    u_char              *request_start;
-    u_char              *request_end;
-    u_char              *method_end;
-    u_char              *schema_start;
-    u_char              *schema_end;
-    u_char              *host_start;
-    u_char              *host_end;
-    u_char              *port_start;
-    u_char              *port_end;
-    u_char              *header_name_start;
-    u_char              *header_name_end;
-    u_char              *header_start;
-    u_char              *header_end;
+    ngx_uint_t                        state;
+    u_char                           *uri_start;
+    u_char                           *uri_end;
+    u_char                           *uri_ext;
+    u_char                           *args_start;
+    u_char                           *request_start;
+    u_char                           *request_end;
+    u_char                           *method_end;
+    u_char                           *schema_start;
+    u_char                           *schema_end;
+    u_char                           *host_start;
+    u_char                           *host_end;
+    u_char                           *port_start;
+    u_char                           *port_end;
+    u_char                           *header_name_start;
+    u_char                           *header_name_end;
+    u_char                           *header_start;
+    u_char                           *header_end;
 };