nginx-0.1.29-RELEASE import
*) Feature: the ngx_http_ssi_module supports "include virtual" command.
*) Feature: the ngx_http_ssi_module supports the condition command like
'if expr="$NAME"' and "else" and "endif" commands. Only one nested
level is supported.
*) Feature: the ngx_http_ssi_module supports the DATE_LOCAL and
DATE_GMT variables and "config timefmt" command.
*) Feature: the "ssi_ignore_recycled_buffers" directive.
*) Bugfix: the "echo" command did not show the default value for the
empty QUERY_STRING variable.
*) Change: the ngx_http_proxy_module was rewritten.
*) Feature: the "proxy_redirect", "proxy_pass_request_headers",
"proxy_pass_request_body", and "proxy_method" directives.
*) Feature: the "proxy_set_header" directive. The "proxy_x_var" was
canceled and must be replaced with the proxy_set_header directive.
*) Change: the "proxy_preserve_host" is canceled and must be replaced
with the "proxy_set_header Host $host" and the "proxy_redirect off"
directives, the "proxy_set_header Host $host:$proxy_port" directive
and the appropriate proxy_redirect directives.
*) Change: the "proxy_set_x_real_ip" is canceled and must be replaced
with the "proxy_set_header X-Real-IP $remote_addr" directive.
*) Change: the "proxy_add_x_forwarded_for" is canceled and must be
replaced with
the "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for"
directive.
*) Change: the "proxy_set_x_url" is canceled and must be replaced with
the "proxy_set_header X-URL http://$host:$server_port$request_uri"
directive.
*) Feature: the "fastcgi_param" directive.
*) Change: the "fastcgi_root", "fastcgi_set_var" and "fastcgi_params"
directive are canceled and must be replaced with the fastcgi_param
directives.
*) Feature: the "index" directive can use the variables.
*) Feature: the "index" directive can be used at http and server levels.
*) Change: the last index only in the "index" directive can be absolute.
*) Feature: the "rewrite" directive can use the variables.
*) Feature: the "internal" directive.
*) Feature: the CONTENT_LENGTH, CONTENT_TYPE, REMOTE_PORT, SERVER_ADDR,
SERVER_PORT, SERVER_PROTOCOL, DOCUMENT_ROOT, SERVER_NAME,
REQUEST_METHOD, REQUEST_URI, and REMOTE_USER variables.
*) Change: nginx now passes the invalid lines in a client request
headers or a backend response header.
*) Bugfix: if the backend did not transfer response for a long time and
the "send_timeout" was less than "proxy_read_timeout", then nginx
returned the 408 response.
*) Bugfix: the segmentation fault was occurred if the backend sent an
invalid line in response header; the bug had appeared in 0.1.26.
*) Bugfix: the segmentation fault may occurred in FastCGI fault
tolerance configuration.
*) Bugfix: the "expires" directive did not remove the previous
"Expires" and "Cache-Control" headers.
*) Bugfix: nginx did not take into account trailing dot in "Host"
header line.
*) Bugfix: the ngx_http_auth_module did not work under Linux.
*) Bugfix: the rewrite directive worked incorrectly, if the arguments
were in a request.
*) Bugfix: nginx could not be built on MacOS X.
diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h
index d9889c8..5b26151 100644
--- a/src/http/ngx_http_request.h
+++ b/src/http/ngx_http_request.h
@@ -8,6 +8,9 @@
#define _NGX_HTTP_REQUEST_H_INCLUDED_
+#define NGX_HTTP_MAX_REWRITE_CYCLES 10
+
+
#define NGX_HTTP_DISCARD_BUFFER_SIZE 4096
#define NGX_HTTP_LINGERING_BUFFER_SIZE 4096
@@ -114,10 +117,17 @@
typedef struct {
ngx_str_t name;
ngx_uint_t offset;
+ ngx_http_header_handler_pt handler;
} ngx_http_header_t;
typedef struct {
+ ngx_str_t name;
+ ngx_uint_t offset;
+} ngx_http_header0_t;
+
+
+typedef struct {
ngx_list_t headers;
ngx_table_elt_t *host;
@@ -183,7 +193,6 @@
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;
@@ -192,12 +201,14 @@
ngx_table_elt_t *accept_ranges;
ngx_table_elt_t *www_authenticate;
ngx_table_elt_t *expires;
- ngx_table_elt_t *cache_control;
ngx_table_elt_t *etag;
+ ngx_str_t content_type;
ngx_str_t charset;
ngx_array_t ranges;
+ ngx_array_t cache_control;
+
off_t content_length_n;
time_t date_time;
time_t last_modified_time;
@@ -215,24 +226,6 @@
} ngx_http_request_body_t;
-struct ngx_http_cleanup_s {
- union {
- struct {
- ngx_fd_t fd;
- u_char *name;
- } file;
-
- struct {
- ngx_http_cache_hash_t *hash;
- ngx_http_cache_entry_t *cache;
- } cache;
- } data;
-
- unsigned valid:1;
- unsigned cache:1;
-};
-
-
typedef struct {
ngx_http_request_t *request;
@@ -246,7 +239,18 @@
} ngx_http_connection_t;
+typedef struct ngx_http_postponed_request_s ngx_http_postponed_request_t;
+
+struct ngx_http_postponed_request_s {
+ ngx_http_request_t *request;
+ ngx_chain_t *out;
+ ngx_http_postponed_request_t *next;
+};
+
+
typedef ngx_int_t (*ngx_http_handler_pt)(ngx_http_request_t *r);
+typedef void (*ngx_http_event_handler_pt)(ngx_http_request_t *r);
+
struct ngx_http_request_s {
uint32_t signature; /* "HTTP" */
@@ -258,12 +262,13 @@
void **srv_conf;
void **loc_conf;
+ ngx_http_event_handler_pt read_event_handler;
+ ngx_http_event_handler_pt write_event_handler;
+
ngx_http_cache_t *cache;
ngx_http_upstream_t *upstream;
- ngx_file_t file;
-
ngx_pool_t *pool;
ngx_buf_t *header_in;
@@ -289,7 +294,10 @@
ngx_str_t method_name;
ngx_str_t http_protocol;
+ ngx_chain_t *out;
ngx_http_request_t *main;
+ ngx_http_request_t *parent;
+ ngx_http_postponed_request_t *postponed;
uint32_t in_addr;
ngx_uint_t port;
@@ -303,19 +311,18 @@
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 request_length;
- u_char *discarded_buffer;
void **err_ctx;
ngx_uint_t err_status;
ngx_http_connection_t *http_connection;
+ ngx_http_log_handler_pt log_handler;
+
unsigned http_state:4;
/* URI with "/." and on Win32 with "//" */
@@ -330,12 +337,11 @@
/* URI with "\0" or "%00" */
unsigned zero_in_uri:1;
+ unsigned valid_location:1;
unsigned valid_unparsed_uri:1;
unsigned uri_changed:1;
unsigned uri_changes:4;
- unsigned invalid_header:1;
-
unsigned low_case_exten:1;
unsigned header_timeout_set:1;
@@ -346,14 +352,16 @@
#if 0
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 internal:1;
unsigned closed:1;
+ unsigned done:1;
unsigned filter_need_in_memory:1;
unsigned filter_ssi_need_in_memory:1;
@@ -365,8 +373,6 @@
unsigned stat_writing:1;
#endif
- ngx_uint_t headers_n;
-
/* used to parse HTTP headers */
ngx_uint_t state;
u_char *uri_start;
@@ -391,8 +397,7 @@
extern ngx_http_header_t ngx_http_headers_in[];
-extern ngx_http_header_t ngx_http_headers_out[];
-
+extern ngx_http_header0_t ngx_http_headers_out[];
#endif /* _NGX_HTTP_REQUEST_H_INCLUDED_ */