2004-09-28 04:34:51 -04:00
|
|
|
|
|
|
|
/*
|
2004-09-29 12:00:49 -04:00
|
|
|
* Copyright (C) Igor Sysoev
|
2004-09-28 04:34:51 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2003-01-09 02:36:00 -03:00
|
|
|
#ifndef _NGX_HTTP_CORE_H_INCLUDED_
|
|
|
|
#define _NGX_HTTP_CORE_H_INCLUDED_
|
|
|
|
|
|
|
|
|
|
|
|
#include <ngx_string.h>
|
|
|
|
#include <ngx_array.h>
|
|
|
|
#include <ngx_http.h>
|
|
|
|
|
|
|
|
|
2007-12-27 11:21:59 -03:00
|
|
|
#define NGX_HTTP_GZIP_PROXIED_OFF 0x0002
|
|
|
|
#define NGX_HTTP_GZIP_PROXIED_EXPIRED 0x0004
|
|
|
|
#define NGX_HTTP_GZIP_PROXIED_NO_CACHE 0x0008
|
|
|
|
#define NGX_HTTP_GZIP_PROXIED_NO_STORE 0x0010
|
|
|
|
#define NGX_HTTP_GZIP_PROXIED_PRIVATE 0x0020
|
|
|
|
#define NGX_HTTP_GZIP_PROXIED_NO_LM 0x0040
|
|
|
|
#define NGX_HTTP_GZIP_PROXIED_NO_ETAG 0x0080
|
|
|
|
#define NGX_HTTP_GZIP_PROXIED_AUTH 0x0100
|
|
|
|
#define NGX_HTTP_GZIP_PROXIED_ANY 0x0200
|
|
|
|
|
|
|
|
|
2007-12-29 13:38:23 -03:00
|
|
|
#define NGX_HTTP_SATISFY_ALL 0
|
|
|
|
#define NGX_HTTP_SATISFY_ANY 1
|
|
|
|
|
|
|
|
|
2005-06-15 14:33:41 -04:00
|
|
|
typedef struct {
|
|
|
|
unsigned default_server:1;
|
|
|
|
unsigned bind:1;
|
|
|
|
|
|
|
|
int backlog;
|
2005-10-19 09:33:58 -03:00
|
|
|
int rcvbuf;
|
|
|
|
int sndbuf;
|
2005-06-15 14:33:41 -04:00
|
|
|
|
|
|
|
#if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
|
|
|
|
char *accept_filter;
|
|
|
|
#endif
|
|
|
|
#if (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT)
|
|
|
|
ngx_uint_t deferred_accept;
|
|
|
|
#endif
|
|
|
|
|
2006-04-07 10:08:04 -04:00
|
|
|
u_char addr[INET_ADDRSTRLEN + 6];
|
|
|
|
|
2005-06-15 14:33:41 -04:00
|
|
|
} ngx_http_listen_conf_t;
|
|
|
|
|
|
|
|
|
2003-01-09 02:36:00 -03:00
|
|
|
typedef struct {
|
2004-12-21 09:30:30 -03:00
|
|
|
in_addr_t addr;
|
|
|
|
in_port_t port;
|
|
|
|
int family;
|
2005-06-15 14:33:41 -04:00
|
|
|
|
2007-09-15 13:11:06 -04:00
|
|
|
u_char *file_name;
|
|
|
|
ngx_uint_t line;
|
2004-03-16 03:10:12 -04:00
|
|
|
|
2005-06-15 14:33:41 -04:00
|
|
|
ngx_http_listen_conf_t conf;
|
2003-01-09 02:36:00 -03:00
|
|
|
} ngx_http_listen_t;
|
|
|
|
|
|
|
|
|
2003-11-30 17:03:18 -03:00
|
|
|
typedef enum {
|
nginx-0.3.8-RELEASE import
*) Security: nginx now checks URI got from a backend in
"X-Accel-Redirect" header line or in SSI file for the "/../" paths
and zeroes.
*) Change: nginx now does not treat the empty user name in the
"Authorization" header line as valid one.
*) Feature: the "ssl_session_timeout" directives of the
ngx_http_ssl_module and ngx_imap_ssl_module.
*) Feature: the "auth_http_header" directive of the
ngx_imap_auth_http_module.
*) Feature: the "add_header" directive.
*) Feature: the ngx_http_realip_module.
*) Feature: the new variables to use in the "log_format" directive:
$bytes_sent, $apache_bytes_sent, $status, $time_gmt, $uri,
$request_time, $request_length, $upstream_status,
$upstream_response_time, $gzip_ratio, $uid_got, $uid_set,
$connection, $pipe, and $msec. The parameters in the "%name" form
will be canceled soon.
*) Change: now the false variable values in the "if" directive are the
empty string "" and string starting with "0".
*) Bugfix: while using proxied or FastCGI-server nginx may leave
connections and temporary files with client requests in open state.
*) Bugfix: the worker processes did not flush the buffered logs on
graceful exit.
*) Bugfix: if the request URI was changes by the "rewrite" directive
and the request was proxied in location given by regular expression,
then the incorrect request was transferred to backend; the bug had
appeared in 0.2.6.
*) Bugfix: the "expires" directive did not remove the previous
"Expires" header.
*) Bugfix: nginx may stop to accept requests if the "rtsig" method and
several worker processes were used.
*) Bugfix: the "\"" and "\'" escape symbols were incorrectly handled in
SSI commands.
*) Bugfix: if the response was ended just after the SSI command and
gzipping was used, then the response did not transferred complete or
did not transferred at all.
2005-11-09 14:25:55 -03:00
|
|
|
NGX_HTTP_POST_READ_PHASE = 0,
|
2004-06-24 12:07:04 -04:00
|
|
|
|
nginx-0.3.8-RELEASE import
*) Security: nginx now checks URI got from a backend in
"X-Accel-Redirect" header line or in SSI file for the "/../" paths
and zeroes.
*) Change: nginx now does not treat the empty user name in the
"Authorization" header line as valid one.
*) Feature: the "ssl_session_timeout" directives of the
ngx_http_ssl_module and ngx_imap_ssl_module.
*) Feature: the "auth_http_header" directive of the
ngx_imap_auth_http_module.
*) Feature: the "add_header" directive.
*) Feature: the ngx_http_realip_module.
*) Feature: the new variables to use in the "log_format" directive:
$bytes_sent, $apache_bytes_sent, $status, $time_gmt, $uri,
$request_time, $request_length, $upstream_status,
$upstream_response_time, $gzip_ratio, $uid_got, $uid_set,
$connection, $pipe, and $msec. The parameters in the "%name" form
will be canceled soon.
*) Change: now the false variable values in the "if" directive are the
empty string "" and string starting with "0".
*) Bugfix: while using proxied or FastCGI-server nginx may leave
connections and temporary files with client requests in open state.
*) Bugfix: the worker processes did not flush the buffered logs on
graceful exit.
*) Bugfix: if the request URI was changes by the "rewrite" directive
and the request was proxied in location given by regular expression,
then the incorrect request was transferred to backend; the bug had
appeared in 0.2.6.
*) Bugfix: the "expires" directive did not remove the previous
"Expires" header.
*) Bugfix: nginx may stop to accept requests if the "rtsig" method and
several worker processes were used.
*) Bugfix: the "\"" and "\'" escape symbols were incorrectly handled in
SSI commands.
*) Bugfix: if the response was ended just after the SSI command and
gzipping was used, then the response did not transferred complete or
did not transferred at all.
2005-11-09 14:25:55 -03:00
|
|
|
NGX_HTTP_SERVER_REWRITE_PHASE,
|
2006-08-30 06:39:17 -04:00
|
|
|
|
nginx-0.3.8-RELEASE import
*) Security: nginx now checks URI got from a backend in
"X-Accel-Redirect" header line or in SSI file for the "/../" paths
and zeroes.
*) Change: nginx now does not treat the empty user name in the
"Authorization" header line as valid one.
*) Feature: the "ssl_session_timeout" directives of the
ngx_http_ssl_module and ngx_imap_ssl_module.
*) Feature: the "auth_http_header" directive of the
ngx_imap_auth_http_module.
*) Feature: the "add_header" directive.
*) Feature: the ngx_http_realip_module.
*) Feature: the new variables to use in the "log_format" directive:
$bytes_sent, $apache_bytes_sent, $status, $time_gmt, $uri,
$request_time, $request_length, $upstream_status,
$upstream_response_time, $gzip_ratio, $uid_got, $uid_set,
$connection, $pipe, and $msec. The parameters in the "%name" form
will be canceled soon.
*) Change: now the false variable values in the "if" directive are the
empty string "" and string starting with "0".
*) Bugfix: while using proxied or FastCGI-server nginx may leave
connections and temporary files with client requests in open state.
*) Bugfix: the worker processes did not flush the buffered logs on
graceful exit.
*) Bugfix: if the request URI was changes by the "rewrite" directive
and the request was proxied in location given by regular expression,
then the incorrect request was transferred to backend; the bug had
appeared in 0.2.6.
*) Bugfix: the "expires" directive did not remove the previous
"Expires" header.
*) Bugfix: nginx may stop to accept requests if the "rtsig" method and
several worker processes were used.
*) Bugfix: the "\"" and "\'" escape symbols were incorrectly handled in
SSI commands.
*) Bugfix: if the response was ended just after the SSI command and
gzipping was used, then the response did not transferred complete or
did not transferred at all.
2005-11-09 14:25:55 -03:00
|
|
|
NGX_HTTP_FIND_CONFIG_PHASE,
|
2005-02-16 10:40:36 -03:00
|
|
|
NGX_HTTP_REWRITE_PHASE,
|
2006-08-30 06:39:17 -04:00
|
|
|
NGX_HTTP_POST_REWRITE_PHASE,
|
2004-06-24 12:07:04 -04:00
|
|
|
|
2005-11-26 07:11:11 -03:00
|
|
|
NGX_HTTP_PREACCESS_PHASE,
|
|
|
|
|
2004-06-24 12:07:04 -04:00
|
|
|
NGX_HTTP_ACCESS_PHASE,
|
2006-08-30 06:39:17 -04:00
|
|
|
NGX_HTTP_POST_ACCESS_PHASE,
|
|
|
|
|
2003-11-30 17:03:18 -03:00
|
|
|
NGX_HTTP_CONTENT_PHASE,
|
2004-06-24 12:07:04 -04:00
|
|
|
|
2005-11-26 07:11:11 -03:00
|
|
|
NGX_HTTP_LOG_PHASE
|
2003-11-30 17:03:18 -03:00
|
|
|
} ngx_http_phases;
|
|
|
|
|
2006-08-30 06:39:17 -04:00
|
|
|
typedef struct ngx_http_phase_handler_s ngx_http_phase_handler_t;
|
|
|
|
|
|
|
|
typedef ngx_int_t (*ngx_http_phase_handler_pt)(ngx_http_request_t *r,
|
|
|
|
ngx_http_phase_handler_t *ph);
|
|
|
|
|
|
|
|
struct ngx_http_phase_handler_s {
|
|
|
|
ngx_http_phase_handler_pt checker;
|
|
|
|
ngx_http_handler_pt handler;
|
|
|
|
ngx_uint_t next;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
ngx_http_phase_handler_t *handlers;
|
|
|
|
ngx_uint_t server_rewrite_index;
|
2007-07-29 14:11:39 -04:00
|
|
|
ngx_uint_t location_rewrite_index;
|
2006-08-30 06:39:17 -04:00
|
|
|
} ngx_http_phase_engine_t;
|
|
|
|
|
2003-11-30 17:03:18 -03:00
|
|
|
|
2003-05-16 11:27:48 -04:00
|
|
|
typedef struct {
|
2004-12-21 09:30:30 -03:00
|
|
|
ngx_array_t handlers;
|
2003-10-10 11:10:50 -04:00
|
|
|
} ngx_http_phase_t;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2005-02-03 16:33:37 -03:00
|
|
|
ngx_array_t servers; /* ngx_http_core_srv_conf_t */
|
2004-12-21 09:30:30 -03:00
|
|
|
|
2006-08-30 06:39:17 -04:00
|
|
|
ngx_http_phase_engine_t phase_engine;
|
2003-10-10 11:10:50 -04:00
|
|
|
|
2006-05-11 10:43:47 -04:00
|
|
|
ngx_hash_t headers_in_hash;
|
2006-02-08 12:33:12 -03:00
|
|
|
|
|
|
|
ngx_hash_t variables_hash;
|
|
|
|
|
|
|
|
ngx_array_t variables; /* ngx_http_variable_t */
|
2005-04-08 11:18:55 -04:00
|
|
|
|
2005-12-26 14:07:48 -03:00
|
|
|
ngx_uint_t server_names_hash_max_size;
|
|
|
|
ngx_uint_t server_names_hash_bucket_size;
|
2005-02-03 16:33:37 -03:00
|
|
|
|
2006-02-08 12:33:12 -03:00
|
|
|
ngx_uint_t variables_hash_max_size;
|
|
|
|
ngx_uint_t variables_hash_bucket_size;
|
|
|
|
|
|
|
|
ngx_hash_keys_arrays_t *variables_keys;
|
2006-08-30 06:39:17 -04:00
|
|
|
|
|
|
|
ngx_http_phase_t phases[NGX_HTTP_LOG_PHASE + 1];
|
2003-05-16 11:27:48 -04:00
|
|
|
} ngx_http_core_main_conf_t;
|
|
|
|
|
|
|
|
|
2003-01-09 02:36:00 -03:00
|
|
|
typedef struct {
|
2004-07-15 12:35:51 -04:00
|
|
|
/*
|
2005-11-26 07:11:11 -03:00
|
|
|
* array of the ngx_http_core_loc_conf_t *,
|
|
|
|
* used in the ngx_http_core_find_location() and in the merge phase
|
2004-07-15 12:35:51 -04:00
|
|
|
*/
|
2004-12-21 09:30:30 -03:00
|
|
|
ngx_array_t locations;
|
2003-05-19 12:39:14 -04:00
|
|
|
|
2007-07-29 14:11:39 -04:00
|
|
|
unsigned regex_start:15;
|
|
|
|
unsigned named_start:15;
|
2007-06-05 02:44:08 -04:00
|
|
|
|
2005-02-03 16:33:37 -03:00
|
|
|
/* array of the ngx_http_listen_t, "listen" directive */
|
2004-12-21 09:30:30 -03:00
|
|
|
ngx_array_t listen;
|
2003-05-23 07:53:01 -04:00
|
|
|
|
2005-02-03 16:33:37 -03:00
|
|
|
/* array of the ngx_http_server_name_t, "server_name" directive */
|
2004-12-21 09:30:30 -03:00
|
|
|
ngx_array_t server_names;
|
2004-03-16 03:10:12 -04:00
|
|
|
|
2004-07-15 12:35:51 -04:00
|
|
|
/* server ctx */
|
2004-12-21 09:30:30 -03:00
|
|
|
ngx_http_conf_ctx_t *ctx;
|
2004-03-16 03:10:12 -04:00
|
|
|
|
2005-12-26 14:07:48 -03:00
|
|
|
ngx_str_t server_name;
|
|
|
|
|
2004-12-21 09:30:30 -03:00
|
|
|
size_t connection_pool_size;
|
|
|
|
size_t request_pool_size;
|
|
|
|
size_t client_header_buffer_size;
|
2004-05-14 12:51:47 -04:00
|
|
|
|
2004-12-21 09:30:30 -03:00
|
|
|
ngx_bufs_t large_client_header_buffers;
|
2004-09-22 12:18:21 -04:00
|
|
|
|
2004-12-21 09:30:30 -03:00
|
|
|
ngx_msec_t client_header_timeout;
|
2004-07-15 12:35:51 -04:00
|
|
|
|
2006-02-03 09:58:48 -03:00
|
|
|
ngx_flag_t optimize_server_names;
|
2005-05-14 14:42:03 -04:00
|
|
|
ngx_flag_t ignore_invalid_headers;
|
2007-10-18 08:36:58 -03:00
|
|
|
ngx_flag_t merge_slashes;
|
2003-01-09 02:36:00 -03:00
|
|
|
} ngx_http_core_srv_conf_t;
|
|
|
|
|
|
|
|
|
2003-01-29 04:25:51 -03:00
|
|
|
/* list of structures to find core_srv_conf quickly at run time */
|
2003-01-09 02:36:00 -03:00
|
|
|
|
2005-12-26 14:07:48 -03:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
in_addr_t addr;
|
2007-08-12 15:48:12 -04:00
|
|
|
|
2005-12-26 14:07:48 -03:00
|
|
|
/* the default server configuration for this address:port */
|
|
|
|
ngx_http_core_srv_conf_t *core_srv_conf;
|
2007-08-12 15:48:12 -04:00
|
|
|
|
2005-12-26 14:07:48 -03:00
|
|
|
ngx_http_virtual_names_t *virtual_names;
|
|
|
|
} ngx_http_in_addr_t;
|
|
|
|
|
|
|
|
|
2003-01-09 02:36:00 -03:00
|
|
|
typedef struct {
|
2004-12-21 09:30:30 -03:00
|
|
|
in_port_t port;
|
|
|
|
ngx_str_t port_text;
|
2005-12-26 14:07:48 -03:00
|
|
|
ngx_http_in_addr_t *addrs;
|
|
|
|
ngx_uint_t naddrs;
|
2003-01-09 02:36:00 -03:00
|
|
|
} ngx_http_in_port_t;
|
|
|
|
|
2003-05-15 11:42:53 -04:00
|
|
|
|
2005-12-26 14:07:48 -03:00
|
|
|
typedef struct {
|
|
|
|
in_port_t port;
|
|
|
|
ngx_array_t addrs; /* array of ngx_http_conf_in_addr_t */
|
|
|
|
} ngx_http_conf_in_port_t;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2003-11-25 17:44:56 -03:00
|
|
|
in_addr_t addr;
|
2004-12-21 09:30:30 -03:00
|
|
|
|
2005-12-26 14:07:48 -03:00
|
|
|
ngx_hash_t hash;
|
2007-06-11 15:49:22 -04:00
|
|
|
ngx_hash_wildcard_t *wc_head;
|
|
|
|
ngx_hash_wildcard_t *wc_tail;
|
2005-12-26 14:07:48 -03:00
|
|
|
|
|
|
|
ngx_array_t names; /* array of ngx_http_server_name_t */
|
2004-12-21 09:30:30 -03:00
|
|
|
|
2007-08-12 15:48:12 -04:00
|
|
|
#if (NGX_PCRE)
|
|
|
|
ngx_uint_t nregex;
|
|
|
|
ngx_http_server_name_t *regex;
|
|
|
|
#endif
|
|
|
|
|
2004-12-21 09:30:30 -03:00
|
|
|
/* the default server configuration for this address:port */
|
|
|
|
ngx_http_core_srv_conf_t *core_srv_conf;
|
2003-01-09 02:36:00 -03:00
|
|
|
|
2005-12-26 14:07:48 -03:00
|
|
|
unsigned default_server:1;
|
|
|
|
unsigned bind:1;
|
|
|
|
|
|
|
|
ngx_http_listen_conf_t *listen_conf;
|
|
|
|
} ngx_http_conf_in_addr_t;
|
2003-01-09 02:36:00 -03:00
|
|
|
|
2003-05-15 11:42:53 -04:00
|
|
|
|
2007-08-12 15:48:12 -04:00
|
|
|
struct ngx_http_server_name_s {
|
|
|
|
#if (NGX_PCRE)
|
|
|
|
ngx_regex_t *regex;
|
|
|
|
#endif
|
2003-01-29 04:25:51 -03:00
|
|
|
ngx_http_core_srv_conf_t *core_srv_conf; /* virtual name server conf */
|
2007-08-12 15:48:12 -04:00
|
|
|
ngx_str_t name;
|
|
|
|
};
|
2003-01-29 04:25:51 -03:00
|
|
|
|
|
|
|
|
2003-11-09 17:03:38 -03:00
|
|
|
typedef struct {
|
2006-08-14 11:09:38 -04:00
|
|
|
ngx_int_t status;
|
|
|
|
ngx_int_t overwrite;
|
|
|
|
ngx_str_t uri;
|
2008-04-29 06:06:43 -04:00
|
|
|
ngx_str_t args;
|
2006-08-14 11:09:38 -04:00
|
|
|
ngx_array_t *uri_lengths;
|
|
|
|
ngx_array_t *uri_values;
|
2003-11-09 17:03:38 -03:00
|
|
|
} ngx_http_err_page_t;
|
|
|
|
|
|
|
|
|
2004-07-18 15:11:20 -04:00
|
|
|
typedef struct ngx_http_core_loc_conf_s ngx_http_core_loc_conf_t;
|
|
|
|
|
|
|
|
struct ngx_http_core_loc_conf_s {
|
2003-05-27 08:18:54 -04:00
|
|
|
ngx_str_t name; /* location name */
|
2004-07-18 15:11:20 -04:00
|
|
|
|
2004-10-21 12:34:38 -03:00
|
|
|
#if (NGX_PCRE)
|
2004-07-18 15:11:20 -04:00
|
|
|
ngx_regex_t *regex;
|
|
|
|
#endif
|
|
|
|
|
2007-07-29 14:11:39 -04:00
|
|
|
unsigned regex_start:15;
|
2007-06-05 02:44:08 -04:00
|
|
|
|
2007-07-29 14:11:39 -04:00
|
|
|
unsigned noname:1; /* "if () {}" block or limit_except */
|
|
|
|
unsigned named:1;
|
2005-02-03 16:33:37 -03:00
|
|
|
|
2004-07-18 15:11:20 -04:00
|
|
|
unsigned exact_match:1;
|
2004-11-20 16:52:20 -03:00
|
|
|
unsigned noregex:1;
|
|
|
|
|
2004-07-18 15:11:20 -04:00
|
|
|
unsigned auto_redirect:1;
|
|
|
|
unsigned alias:1;
|
|
|
|
|
|
|
|
/* array of inclusive ngx_http_core_loc_conf_t */
|
2007-06-05 07:42:59 -04:00
|
|
|
ngx_array_t *locations;
|
2004-07-18 15:11:20 -04:00
|
|
|
|
|
|
|
/* pointer to the modules' loc_conf */
|
|
|
|
void **loc_conf ;
|
2003-01-09 02:36:00 -03:00
|
|
|
|
2006-04-07 10:08:04 -04:00
|
|
|
uint32_t limit_except;
|
|
|
|
void **limit_except_loc_conf ;
|
|
|
|
|
2004-06-16 11:32:11 -04:00
|
|
|
ngx_http_handler_pt handler;
|
2003-04-08 11:40:10 -04:00
|
|
|
|
2005-11-15 10:30:52 -03:00
|
|
|
ngx_str_t root; /* root, alias */
|
|
|
|
ngx_str_t post_action;
|
|
|
|
|
2005-12-28 11:23:52 -03:00
|
|
|
ngx_array_t *root_lengths;
|
|
|
|
ngx_array_t *root_values;
|
|
|
|
|
2005-12-16 12:07:08 -03:00
|
|
|
ngx_array_t *types;
|
|
|
|
ngx_hash_t types_hash;
|
|
|
|
ngx_str_t default_type;
|
|
|
|
|
2006-07-07 12:33:19 -04:00
|
|
|
off_t client_max_body_size; /* client_max_body_size */
|
|
|
|
|
2004-04-01 12:20:53 -04:00
|
|
|
size_t client_body_buffer_size; /* client_body_buffer_size */
|
2004-06-21 11:59:32 -04:00
|
|
|
size_t send_lowat; /* send_lowat */
|
2004-07-14 12:01:42 -04:00
|
|
|
size_t postpone_output; /* postpone_output */
|
|
|
|
size_t limit_rate; /* limit_rate */
|
2007-05-07 02:33:39 -04:00
|
|
|
size_t sendfile_max_chunk; /* sendfile_max_chunk */
|
2004-03-16 03:10:12 -04:00
|
|
|
|
2003-10-27 18:01:00 -03:00
|
|
|
ngx_msec_t client_body_timeout; /* client_body_timeout */
|
2003-05-27 08:18:54 -04:00
|
|
|
ngx_msec_t send_timeout; /* send_timeout */
|
|
|
|
ngx_msec_t keepalive_timeout; /* keepalive_timeout */
|
|
|
|
ngx_msec_t lingering_time; /* lingering_time */
|
|
|
|
ngx_msec_t lingering_timeout; /* lingering_timeout */
|
2007-11-27 08:33:52 -03:00
|
|
|
ngx_msec_t resolver_timeout; /* resolver_timeout */
|
|
|
|
|
|
|
|
ngx_resolver_t *resolver; /* resolver */
|
2003-04-08 11:40:10 -04:00
|
|
|
|
2004-09-23 02:32:00 -04:00
|
|
|
time_t keepalive_header; /* keepalive_timeout */
|
|
|
|
|
2007-12-29 13:38:23 -03:00
|
|
|
ngx_uint_t satisfy; /* satisfy */
|
|
|
|
|
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.
2005-05-12 10:58:06 -04:00
|
|
|
ngx_flag_t internal; /* internal */
|
2006-04-14 05:53:38 -04:00
|
|
|
ngx_flag_t client_body_in_file_only; /* client_body_in_file_only */
|
2004-03-16 03:10:12 -04:00
|
|
|
ngx_flag_t sendfile; /* sendfile */
|
|
|
|
ngx_flag_t tcp_nopush; /* tcp_nopush */
|
2004-10-11 12:07:03 -03:00
|
|
|
ngx_flag_t tcp_nodelay; /* tcp_nodelay */
|
2004-06-06 15:49:18 -04:00
|
|
|
ngx_flag_t reset_timedout_connection; /* reset_timedout_connection */
|
2007-12-29 12:30:39 -03:00
|
|
|
ngx_flag_t server_name_in_redirect; /* server_name_in_redirect */
|
2005-06-07 11:56:31 -04:00
|
|
|
ngx_flag_t port_in_redirect; /* port_in_redirect */
|
2004-03-16 03:10:12 -04:00
|
|
|
ngx_flag_t msie_padding; /* msie_padding */
|
2006-08-28 12:57:48 -04:00
|
|
|
ngx_flag_t msie_refresh; /* msie_refresh */
|
2005-07-08 10:34:20 -04:00
|
|
|
ngx_flag_t log_not_found; /* log_not_found */
|
2006-08-28 12:57:48 -04:00
|
|
|
ngx_flag_t recursive_error_pages; /* recursive_error_pages */
|
2007-10-22 07:17:34 -03:00
|
|
|
ngx_flag_t server_tokens; /* server_tokens */
|
2004-03-16 03:10:12 -04:00
|
|
|
|
2007-12-27 11:21:59 -03:00
|
|
|
#if (NGX_HTTP_GZIP)
|
|
|
|
ngx_flag_t gzip_vary; /* gzip_vary */
|
|
|
|
|
|
|
|
ngx_uint_t gzip_http_version; /* gzip_http_version */
|
|
|
|
ngx_uint_t gzip_proxied; /* gzip_proxied */
|
|
|
|
|
|
|
|
#if (NGX_PCRE)
|
|
|
|
ngx_array_t *gzip_disable; /* gzip_disable */
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2003-11-09 17:03:38 -03:00
|
|
|
ngx_array_t *error_pages; /* error_page */
|
2003-10-24 03:53:41 -03:00
|
|
|
|
nginx-0.1.14-RELEASE import
*) Feature: the autoconfiguration directives:
--http-client-body-temp-path=PATH, --http-proxy-temp-path=PATH, and
--http-fastcgi-temp-path=PATH
*) Change: the directory name for the temporary files with the client
request body is specified by directive client_body_temp_path, by
default it is <prefix>/client_body_temp.
*) Feature: the ngx_http_fastcgi_module and the directives:
fastcgi_pass, fastcgi_root, fastcgi_index, fastcgi_params,
fastcgi_connect_timeout, fastcgi_send_timeout, fastcgi_read_timeout,
fastcgi_send_lowat, fastcgi_header_buffer_size, fastcgi_buffers,
fastcgi_busy_buffers_size, fastcgi_temp_path,
fastcgi_max_temp_file_size, fastcgi_temp_file_write_size,
fastcgi_next_upstream, and fastcgi_x_powered_by.
*) Bugfix: the "[alert] zero size buf" error; the bug had appeared in
0.1.3.
*) Change: the URI must be specified after the host name in the
proxy_pass directive.
*) Change: the %3F symbol in the URI was considered as the argument
string start.
*) Feature: the unix domain sockets support in the
ngx_http_proxy_module.
*) Feature: the ssl_engine and ssl_ciphers directives.
Thanks to Sergey Skvortsov for SSL-accelerator.
2005-01-18 10:03:58 -03:00
|
|
|
ngx_path_t *client_body_temp_path; /* client_body_temp_path */
|
|
|
|
|
2007-09-01 08:12:48 -04:00
|
|
|
ngx_open_file_cache_t *open_file_cache;
|
2007-12-21 13:19:48 -03:00
|
|
|
time_t open_file_cache_valid;
|
2007-12-22 10:19:39 -03:00
|
|
|
ngx_uint_t open_file_cache_min_uses;
|
2007-09-01 08:12:48 -04:00
|
|
|
ngx_flag_t open_file_cache_errors;
|
2007-09-03 04:41:42 -04:00
|
|
|
ngx_flag_t open_file_cache_events;
|
2003-11-30 17:03:18 -03:00
|
|
|
|
2003-07-07 02:11:50 -04:00
|
|
|
ngx_log_t *err_log;
|
2004-07-18 15:11:20 -04:00
|
|
|
|
2005-12-16 12:07:08 -03:00
|
|
|
ngx_uint_t types_hash_max_size;
|
|
|
|
ngx_uint_t types_hash_bucket_size;
|
|
|
|
|
2005-02-03 16:33:37 -03:00
|
|
|
#if 0
|
2004-07-18 15:11:20 -04:00
|
|
|
ngx_http_core_loc_conf_t *prev_location;
|
2005-02-03 16:33:37 -03:00
|
|
|
#endif
|
2004-07-18 15:11:20 -04:00
|
|
|
};
|
2003-01-09 02:36:00 -03:00
|
|
|
|
|
|
|
|
2006-08-30 06:39:17 -04:00
|
|
|
void ngx_http_core_run_phases(ngx_http_request_t *r);
|
|
|
|
ngx_int_t ngx_http_core_generic_phase(ngx_http_request_t *r,
|
|
|
|
ngx_http_phase_handler_t *ph);
|
|
|
|
ngx_int_t ngx_http_core_find_config_phase(ngx_http_request_t *r,
|
|
|
|
ngx_http_phase_handler_t *ph);
|
|
|
|
ngx_int_t ngx_http_core_post_rewrite_phase(ngx_http_request_t *r,
|
|
|
|
ngx_http_phase_handler_t *ph);
|
|
|
|
ngx_int_t ngx_http_core_access_phase(ngx_http_request_t *r,
|
|
|
|
ngx_http_phase_handler_t *ph);
|
|
|
|
ngx_int_t ngx_http_core_post_access_phase(ngx_http_request_t *r,
|
|
|
|
ngx_http_phase_handler_t *ph);
|
|
|
|
ngx_int_t ngx_http_core_content_phase(ngx_http_request_t *r,
|
|
|
|
ngx_http_phase_handler_t *ph);
|
2003-01-09 02:36:00 -03:00
|
|
|
|
2003-11-30 17:03:18 -03:00
|
|
|
ngx_int_t ngx_http_set_content_type(ngx_http_request_t *r);
|
2003-12-25 17:26:58 -03:00
|
|
|
ngx_int_t ngx_http_set_exten(ngx_http_request_t *r);
|
2005-10-07 09:30:52 -04:00
|
|
|
u_char *ngx_http_map_uri_to_path(ngx_http_request_t *r, ngx_str_t *name,
|
2006-10-12 09:36:54 -04:00
|
|
|
size_t *root_length, size_t reserved);
|
2005-09-06 12:09:32 -04:00
|
|
|
ngx_int_t ngx_http_auth_basic_user(ngx_http_request_t *r);
|
2007-12-29 12:30:39 -03:00
|
|
|
ngx_int_t ngx_http_server_addr(ngx_http_request_t *r, ngx_str_t *s);
|
2007-12-27 11:21:59 -03:00
|
|
|
#if (NGX_HTTP_GZIP)
|
|
|
|
ngx_int_t ngx_http_gzip_ok(ngx_http_request_t *r);
|
|
|
|
#endif
|
|
|
|
|
2003-11-30 17:03:18 -03:00
|
|
|
|
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.
2005-05-12 10:58:06 -04:00
|
|
|
ngx_int_t ngx_http_subrequest(ngx_http_request_t *r,
|
2006-10-10 10:30:39 -04:00
|
|
|
ngx_str_t *uri, ngx_str_t *args, ngx_http_request_t **sr,
|
2006-10-13 11:20:10 -04:00
|
|
|
ngx_http_post_subrequest_t *psr, ngx_uint_t flags);
|
2004-06-16 11:32:11 -04:00
|
|
|
ngx_int_t ngx_http_internal_redirect(ngx_http_request_t *r,
|
2005-03-04 11:06:57 -03:00
|
|
|
ngx_str_t *uri, ngx_str_t *args);
|
2007-07-29 14:11:39 -04:00
|
|
|
ngx_int_t ngx_http_named_location(ngx_http_request_t *r, ngx_str_t *name);
|
|
|
|
|
2005-02-03 16:33:37 -03:00
|
|
|
|
2005-10-24 12:09:41 -03:00
|
|
|
ngx_http_cleanup_t *ngx_http_cleanup_add(ngx_http_request_t *r, size_t size);
|
|
|
|
|
2003-01-09 02:36:00 -03:00
|
|
|
|
2004-06-16 11:32:11 -04:00
|
|
|
typedef ngx_int_t (*ngx_http_output_header_filter_pt)(ngx_http_request_t *r);
|
|
|
|
typedef ngx_int_t (*ngx_http_output_body_filter_pt)
|
2005-03-04 11:06:57 -03:00
|
|
|
(ngx_http_request_t *r, ngx_chain_t *chain);
|
2004-06-06 15:49:18 -04:00
|
|
|
|
|
|
|
|
2004-06-16 11:32:11 -04:00
|
|
|
ngx_int_t ngx_http_output_filter(ngx_http_request_t *r, ngx_chain_t *chain);
|
|
|
|
ngx_int_t ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *chain);
|
2004-06-06 15:49:18 -04:00
|
|
|
|
|
|
|
|
2005-11-15 10:30:52 -03:00
|
|
|
extern ngx_module_t ngx_http_core_module;
|
|
|
|
|
|
|
|
extern ngx_uint_t ngx_http_max_module;
|
|
|
|
|
|
|
|
|
|
|
|
#define ngx_http_clear_content_length(r) \
|
|
|
|
\
|
|
|
|
r->headers_out.content_length_n = -1; \
|
|
|
|
if (r->headers_out.content_length) { \
|
|
|
|
r->headers_out.content_length->hash = 0; \
|
|
|
|
r->headers_out.content_length = NULL; \
|
|
|
|
}
|
|
|
|
\
|
|
|
|
#define ngx_http_clear_accept_ranges(r) \
|
|
|
|
\
|
2005-11-26 07:11:11 -03:00
|
|
|
r->allow_ranges = 0; \
|
2005-11-15 10:30:52 -03:00
|
|
|
if (r->headers_out.accept_ranges) { \
|
|
|
|
r->headers_out.accept_ranges->hash = 0 ; \
|
|
|
|
r->headers_out.accept_ranges = NULL; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define ngx_http_clear_last_modified(r) \
|
|
|
|
\
|
|
|
|
r->headers_out.last_modified_time = -1; \
|
|
|
|
if (r->headers_out.last_modified) { \
|
|
|
|
r->headers_out.last_modified->hash = 0; \
|
|
|
|
r->headers_out.last_modified = NULL; \
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-01-09 02:36:00 -03:00
|
|
|
#endif /* _NGX_HTTP_CORE_H_INCLUDED_ */
|