2004-09-28 04:34:51 -04:00
|
|
|
|
|
|
|
/*
|
2004-09-29 12:00:49 -04:00
|
|
|
* Copyright (C) Igor Sysoev
|
2012-01-18 12:07:43 -03:00
|
|
|
* Copyright (C) Nginx, Inc.
|
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_
|
|
|
|
|
|
|
|
|
2008-09-05 11:25:47 -04:00
|
|
|
#include <ngx_config.h>
|
|
|
|
#include <ngx_core.h>
|
2003-01-09 02:36:00 -03:00
|
|
|
#include <ngx_http.h>
|
|
|
|
|
2015-03-14 11:37:25 -03:00
|
|
|
#if (NGX_THREADS)
|
|
|
|
#include <ngx_thread_pool.h>
|
2016-10-10 12:44:17 -03:00
|
|
|
#elif (NGX_COMPAT)
|
|
|
|
typedef struct ngx_thread_pool_s ngx_thread_pool_t;
|
2015-03-14 11:37:25 -03:00
|
|
|
#endif
|
|
|
|
|
2003-01-09 02:36:00 -03:00
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2009-08-30 05:52:39 -04:00
|
|
|
#define NGX_HTTP_AIO_OFF 0
|
|
|
|
#define NGX_HTTP_AIO_ON 1
|
2015-03-14 11:37:25 -03:00
|
|
|
#define NGX_HTTP_AIO_THREADS 2
|
2009-08-30 05:52:39 -04:00
|
|
|
|
|
|
|
|
2007-12-29 13:38:23 -03:00
|
|
|
#define NGX_HTTP_SATISFY_ALL 0
|
|
|
|
#define NGX_HTTP_SATISFY_ANY 1
|
|
|
|
|
|
|
|
|
2011-08-01 09:26:55 -04:00
|
|
|
#define NGX_HTTP_LINGERING_OFF 0
|
|
|
|
#define NGX_HTTP_LINGERING_ON 1
|
|
|
|
#define NGX_HTTP_LINGERING_ALWAYS 2
|
|
|
|
|
|
|
|
|
2009-02-10 12:05:05 -03:00
|
|
|
#define NGX_HTTP_IMS_OFF 0
|
|
|
|
#define NGX_HTTP_IMS_EXACT 1
|
|
|
|
#define NGX_HTTP_IMS_BEFORE 2
|
|
|
|
|
|
|
|
|
2010-11-26 09:40:56 -03:00
|
|
|
#define NGX_HTTP_KEEPALIVE_DISABLE_NONE 0x0002
|
|
|
|
#define NGX_HTTP_KEEPALIVE_DISABLE_MSIE6 0x0004
|
|
|
|
#define NGX_HTTP_KEEPALIVE_DISABLE_SAFARI 0x0008
|
|
|
|
|
|
|
|
|
2017-01-31 06:09:40 -03:00
|
|
|
#define NGX_HTTP_SERVER_TOKENS_OFF 0
|
|
|
|
#define NGX_HTTP_SERVER_TOKENS_ON 1
|
|
|
|
#define NGX_HTTP_SERVER_TOKENS_BUILD 2
|
|
|
|
|
|
|
|
|
2008-05-24 10:14:13 -04:00
|
|
|
typedef struct ngx_http_location_tree_node_s ngx_http_location_tree_node_t;
|
|
|
|
typedef struct ngx_http_core_loc_conf_s ngx_http_core_loc_conf_t;
|
|
|
|
|
|
|
|
|
2005-06-15 14:33:41 -04:00
|
|
|
typedef struct {
|
2019-03-15 09:45:56 -03:00
|
|
|
struct sockaddr *sockaddr;
|
2009-10-21 13:47:44 -03:00
|
|
|
socklen_t socklen;
|
2019-03-15 09:45:56 -03:00
|
|
|
ngx_str_t addr_text;
|
2009-10-21 13:47:44 -03:00
|
|
|
|
2009-10-21 16:16:38 -03:00
|
|
|
unsigned set:1;
|
2005-06-15 14:33:41 -04:00
|
|
|
unsigned default_server:1;
|
|
|
|
unsigned bind:1;
|
2009-02-21 04:02:02 -03:00
|
|
|
unsigned wildcard:1;
|
2008-09-01 10:19:01 -04:00
|
|
|
unsigned ssl:1;
|
2015-09-11 14:13:06 -03:00
|
|
|
unsigned http2:1;
|
2020-02-28 07:09:51 -03:00
|
|
|
unsigned http3:1;
|
2023-02-27 07:00:56 -03:00
|
|
|
unsigned quic:1;
|
2016-10-03 09:58:25 -03:00
|
|
|
#if (NGX_HAVE_INET6)
|
2012-07-30 08:27:06 -04:00
|
|
|
unsigned ipv6only:1;
|
2015-05-20 09:51:56 -03:00
|
|
|
#endif
|
2016-10-03 09:58:30 -03:00
|
|
|
unsigned deferred_accept:1;
|
2015-05-20 09:51:56 -03:00
|
|
|
unsigned reuseport:1;
|
2011-12-05 05:06:15 -03:00
|
|
|
unsigned so_keepalive:2;
|
2014-03-17 10:41:24 -03:00
|
|
|
unsigned proxy_protocol:1;
|
2005-06-15 14:33:41 -04:00
|
|
|
|
|
|
|
int backlog;
|
2005-10-19 09:33:58 -03:00
|
|
|
int rcvbuf;
|
|
|
|
int sndbuf;
|
2020-02-28 07:09:51 -03:00
|
|
|
int type;
|
2010-07-05 09:49:16 -04:00
|
|
|
#if (NGX_HAVE_SETFIB)
|
|
|
|
int setfib;
|
|
|
|
#endif
|
2013-12-03 15:07:03 -03:00
|
|
|
#if (NGX_HAVE_TCP_FASTOPEN)
|
|
|
|
int fastopen;
|
|
|
|
#endif
|
2011-12-05 05:06:15 -03:00
|
|
|
#if (NGX_HAVE_KEEPALIVE_TUNABLE)
|
|
|
|
int tcp_keepidle;
|
|
|
|
int tcp_keepintvl;
|
|
|
|
int tcp_keepcnt;
|
|
|
|
#endif
|
2005-06-15 14:33:41 -04:00
|
|
|
|
|
|
|
#if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
|
|
|
|
char *accept_filter;
|
|
|
|
#endif
|
2009-10-21 05:19:46 -03:00
|
|
|
} ngx_http_listen_opt_t;
|
2005-06-15 14:33:41 -04:00
|
|
|
|
|
|
|
|
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,
|
|
|
|
|
2017-07-20 08:51:11 -04:00
|
|
|
NGX_HTTP_PRECONTENT_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;
|
|
|
|
|
2017-01-31 15:19:58 -03:00
|
|
|
ngx_array_t variables; /* ngx_http_variable_t */
|
|
|
|
ngx_array_t prefix_variables; /* ngx_http_variable_t */
|
2009-11-16 09:19:02 -03:00
|
|
|
ngx_uint_t ncaptures;
|
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
|
|
|
|
2009-10-21 05:19:46 -03:00
|
|
|
ngx_array_t *ports;
|
|
|
|
|
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 {
|
2005-02-03 16:33:37 -03:00
|
|
|
/* array of the ngx_http_server_name_t, "server_name" directive */
|
2008-05-24 10:14:13 -04:00
|
|
|
ngx_array_t server_names;
|
2004-03-16 03:10:12 -04:00
|
|
|
|
2004-07-15 12:35:51 -04:00
|
|
|
/* server ctx */
|
2008-05-24 10:14:13 -04:00
|
|
|
ngx_http_conf_ctx_t *ctx;
|
|
|
|
|
2018-04-24 09:29:01 -03:00
|
|
|
u_char *file_name;
|
|
|
|
ngx_uint_t line;
|
|
|
|
|
2008-05-24 10:14:13 -04:00
|
|
|
ngx_str_t server_name;
|
2004-03-16 03:10:12 -04:00
|
|
|
|
2008-05-24 10:14:13 -04:00
|
|
|
size_t connection_pool_size;
|
|
|
|
size_t request_pool_size;
|
|
|
|
size_t client_header_buffer_size;
|
2005-12-26 14:07:48 -03:00
|
|
|
|
2008-05-24 10:14:13 -04:00
|
|
|
ngx_bufs_t large_client_header_buffers;
|
2004-05-14 12:51:47 -04:00
|
|
|
|
2008-05-24 10:14:13 -04:00
|
|
|
ngx_msec_t client_header_timeout;
|
2004-09-22 12:18:21 -04:00
|
|
|
|
2008-05-24 10:14:13 -04:00
|
|
|
ngx_flag_t ignore_invalid_headers;
|
|
|
|
ngx_flag_t merge_slashes;
|
2008-09-24 10:02:50 -04:00
|
|
|
ngx_flag_t underscores_in_headers;
|
2004-07-15 12:35:51 -04:00
|
|
|
|
2009-10-21 13:27:48 -03:00
|
|
|
unsigned listen:1;
|
|
|
|
#if (NGX_PCRE)
|
|
|
|
unsigned captures:1;
|
|
|
|
#endif
|
2009-10-21 05:19:46 -03:00
|
|
|
|
2008-05-24 10:14:13 -04:00
|
|
|
ngx_http_core_loc_conf_t **named_locations;
|
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 {
|
2013-02-27 13:53:01 -03:00
|
|
|
#if (NGX_PCRE)
|
|
|
|
ngx_http_regex_t *regex;
|
|
|
|
#endif
|
|
|
|
ngx_http_core_srv_conf_t *server; /* virtual name server conf */
|
|
|
|
ngx_str_t name;
|
|
|
|
} ngx_http_server_name_t;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2016-03-30 05:52:16 -03:00
|
|
|
ngx_hash_combined_t names;
|
2013-02-27 13:53:01 -03:00
|
|
|
|
2016-03-30 05:52:16 -03:00
|
|
|
ngx_uint_t nregex;
|
|
|
|
ngx_http_server_name_t *regex;
|
2013-02-27 13:53:01 -03:00
|
|
|
} ngx_http_virtual_names_t;
|
|
|
|
|
|
|
|
|
|
|
|
struct ngx_http_addr_conf_s {
|
2005-12-26 14:07:48 -03:00
|
|
|
/* the default server configuration for this address:port */
|
2009-10-21 13:52:10 -03:00
|
|
|
ngx_http_core_srv_conf_t *default_server;
|
2007-08-12 15:48:12 -04:00
|
|
|
|
2009-04-09 09:56:16 -04:00
|
|
|
ngx_http_virtual_names_t *virtual_names;
|
|
|
|
|
2013-03-20 07:36:57 -03:00
|
|
|
unsigned ssl:1;
|
2015-09-11 14:13:06 -03:00
|
|
|
unsigned http2:1;
|
2020-02-28 07:09:51 -03:00
|
|
|
unsigned http3:1;
|
2023-02-27 07:00:56 -03:00
|
|
|
unsigned quic:1;
|
2014-03-17 10:41:24 -03:00
|
|
|
unsigned proxy_protocol:1;
|
2013-02-27 13:53:01 -03:00
|
|
|
};
|
2009-02-21 04:02:02 -03:00
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
in_addr_t addr;
|
|
|
|
ngx_http_addr_conf_t conf;
|
2005-12-26 14:07:48 -03:00
|
|
|
} ngx_http_in_addr_t;
|
|
|
|
|
|
|
|
|
2009-02-21 04:02:02 -03:00
|
|
|
#if (NGX_HAVE_INET6)
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
struct in6_addr addr6;
|
|
|
|
ngx_http_addr_conf_t conf;
|
|
|
|
} ngx_http_in6_addr_t;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2003-01-09 02:36:00 -03:00
|
|
|
typedef struct {
|
2009-02-21 04:02:02 -03:00
|
|
|
/* ngx_http_in_addr_t or ngx_http_in6_addr_t */
|
|
|
|
void *addrs;
|
2005-12-26 14:07:48 -03:00
|
|
|
ngx_uint_t naddrs;
|
2009-02-21 04:02:02 -03:00
|
|
|
} ngx_http_port_t;
|
2003-01-09 02:36:00 -03:00
|
|
|
|
2003-05-15 11:42:53 -04:00
|
|
|
|
2005-12-26 14:07:48 -03:00
|
|
|
typedef struct {
|
2009-02-21 04:02:02 -03:00
|
|
|
ngx_int_t family;
|
2020-02-28 07:09:51 -03:00
|
|
|
ngx_int_t type;
|
2005-12-26 14:07:48 -03:00
|
|
|
in_port_t port;
|
2009-02-21 04:02:02 -03:00
|
|
|
ngx_array_t addrs; /* array of ngx_http_conf_addr_t */
|
|
|
|
} ngx_http_conf_port_t;
|
2005-12-26 14:07:48 -03:00
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2009-10-21 13:47:44 -03:00
|
|
|
ngx_http_listen_opt_t opt;
|
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
|
|
|
|
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 */
|
2009-10-21 13:52:10 -03:00
|
|
|
ngx_http_core_srv_conf_t *default_server;
|
2009-10-21 13:27:48 -03:00
|
|
|
ngx_array_t servers; /* array of ngx_http_core_srv_conf_t */
|
2009-02-21 04:02:02 -03:00
|
|
|
} ngx_http_conf_addr_t;
|
2003-01-09 02:36:00 -03:00
|
|
|
|
2003-05-15 11:42:53 -04: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;
|
2009-03-22 05:40:04 -04:00
|
|
|
ngx_http_complex_value_t value;
|
2008-04-29 06:06:43 -04:00
|
|
|
ngx_str_t args;
|
2003-11-09 17:03:38 -03:00
|
|
|
} ngx_http_err_page_t;
|
|
|
|
|
|
|
|
|
2004-07-18 15:11:20 -04:00
|
|
|
struct ngx_http_core_loc_conf_s {
|
2003-05-27 08:18:54 -04:00
|
|
|
ngx_str_t name; /* location name */
|
2021-05-24 14:55:20 -04:00
|
|
|
ngx_str_t escaped_name;
|
2004-07-18 15:11:20 -04:00
|
|
|
|
2004-10-21 12:34:38 -03:00
|
|
|
#if (NGX_PCRE)
|
2009-11-16 09:19:02 -03:00
|
|
|
ngx_http_regex_t *regex;
|
2004-07-18 15:11:20 -04:00
|
|
|
#endif
|
|
|
|
|
2007-07-29 14:11:39 -04:00
|
|
|
unsigned noname:1; /* "if () {}" block or limit_except */
|
2010-08-03 05:24:25 -04:00
|
|
|
unsigned lmt_excpt:1;
|
2007-07-29 14:11:39 -04:00
|
|
|
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;
|
2008-08-26 11:09:28 -04:00
|
|
|
#if (NGX_HTTP_GZIP)
|
|
|
|
unsigned gzip_disable_msie6:2;
|
2010-10-04 11:03:00 -04:00
|
|
|
unsigned gzip_disable_degradation:2;
|
2008-08-26 11:09:28 -04:00
|
|
|
#endif
|
2004-07-18 15:11:20 -04:00
|
|
|
|
2008-05-24 10:14:13 -04:00
|
|
|
ngx_http_location_tree_node_t *static_locations;
|
2009-03-05 05:24:17 -03:00
|
|
|
#if (NGX_PCRE)
|
2008-05-24 10:14:13 -04:00
|
|
|
ngx_http_core_loc_conf_t **regex_locations;
|
2009-03-05 05:24:17 -03:00
|
|
|
#endif
|
2004-07-18 15:11:20 -04:00
|
|
|
|
|
|
|
/* pointer to the modules' loc_conf */
|
2008-05-22 08:09:41 -04:00
|
|
|
void **loc_conf;
|
2003-01-09 02:36:00 -03:00
|
|
|
|
2006-04-07 10:08:04 -04:00
|
|
|
uint32_t limit_except;
|
2008-05-22 08:09:41 -04:00
|
|
|
void **limit_except_loc_conf;
|
2006-04-07 10:08:04 -04:00
|
|
|
|
2004-06-16 11:32:11 -04:00
|
|
|
ngx_http_handler_pt handler;
|
2003-04-08 11:40:10 -04:00
|
|
|
|
2010-05-31 10:41:54 -04:00
|
|
|
/* location name length for inclusive location with inherited alias */
|
|
|
|
size_t alias;
|
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 */
|
2008-07-30 08:34:04 -04:00
|
|
|
off_t directio; /* directio */
|
2009-08-28 04:15:55 -04:00
|
|
|
off_t directio_alignment; /* directio_alignment */
|
2006-07-07 12:33:19 -04:00
|
|
|
|
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 */
|
2007-05-07 02:33:39 -04:00
|
|
|
size_t sendfile_max_chunk; /* sendfile_max_chunk */
|
2009-09-30 09:21:52 -04:00
|
|
|
size_t read_ahead; /* read_ahead */
|
2018-02-28 10:56:58 -03:00
|
|
|
size_t subrequest_output_buffer_size;
|
|
|
|
/* subrequest_output_buffer_size */
|
2004-03-16 03:10:12 -04:00
|
|
|
|
2019-04-24 09:38:54 -04:00
|
|
|
ngx_http_complex_value_t *limit_rate; /* limit_rate */
|
|
|
|
ngx_http_complex_value_t *limit_rate_after; /* limit_rate_after */
|
|
|
|
|
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 */
|
2021-04-07 17:15:48 -04:00
|
|
|
ngx_msec_t keepalive_time; /* keepalive_time */
|
2003-05-27 08:18:54 -04:00
|
|
|
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 */
|
2020-04-07 18:02:17 -04:00
|
|
|
ngx_msec_t auth_delay; /* auth_delay */
|
2007-11-27 08:33:52 -03:00
|
|
|
|
|
|
|
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 */
|
|
|
|
|
2009-05-25 11:38:36 -04:00
|
|
|
ngx_uint_t keepalive_requests; /* keepalive_requests */
|
2010-11-26 09:40:56 -03:00
|
|
|
ngx_uint_t keepalive_disable; /* keepalive_disable */
|
2007-12-29 13:38:23 -03:00
|
|
|
ngx_uint_t satisfy; /* satisfy */
|
2011-08-01 09:26:55 -04:00
|
|
|
ngx_uint_t lingering_close; /* lingering_close */
|
2008-12-01 11:22:51 -03:00
|
|
|
ngx_uint_t if_modified_since; /* if_modified_since */
|
2011-08-31 06:40:55 -03:00
|
|
|
ngx_uint_t max_ranges; /* max_ranges */
|
2009-05-14 07:31:50 -04:00
|
|
|
ngx_uint_t client_body_in_file_only; /* client_body_in_file_only */
|
2007-12-29 13:38:23 -03:00
|
|
|
|
2009-05-14 07:41:33 -04:00
|
|
|
ngx_flag_t client_body_in_single_buffer;
|
|
|
|
/* client_body_in_singe_buffer */
|
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 */
|
2004-03-16 03:10:12 -04:00
|
|
|
ngx_flag_t sendfile; /* sendfile */
|
2009-08-28 04:12:35 -04:00
|
|
|
ngx_flag_t aio; /* aio */
|
2016-03-18 00:44:49 -03:00
|
|
|
ngx_flag_t aio_write; /* aio_write */
|
2004-03-16 03:10:12 -04:00
|
|
|
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 */
|
2016-12-21 17:10:51 -03:00
|
|
|
ngx_flag_t absolute_redirect; /* absolute_redirect */
|
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 */
|
2008-09-27 11:08:02 -04:00
|
|
|
ngx_flag_t log_subrequest; /* log_subrequest */
|
2006-08-28 12:57:48 -04:00
|
|
|
ngx_flag_t recursive_error_pages; /* recursive_error_pages */
|
2017-01-31 06:09:40 -03:00
|
|
|
ngx_uint_t server_tokens; /* server_tokens */
|
2010-04-01 07:18:00 -03:00
|
|
|
ngx_flag_t chunked_transfer_encoding; /* chunked_transfer_encoding */
|
2012-07-09 10:53:42 -04:00
|
|
|
ngx_flag_t etag; /* etag */
|
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
|
|
|
|
|
2016-10-10 12:44:17 -03:00
|
|
|
#if (NGX_THREADS || NGX_COMPAT)
|
2015-03-14 11:37:25 -03:00
|
|
|
ngx_thread_pool_t *thread_pool;
|
|
|
|
ngx_http_complex_value_t *thread_pool_value;
|
|
|
|
#endif
|
|
|
|
|
2012-02-13 13:29:04 -03:00
|
|
|
#if (NGX_HAVE_OPENAT)
|
|
|
|
ngx_uint_t disable_symlinks; /* disable_symlinks */
|
2012-02-27 13:54:10 -03:00
|
|
|
ngx_http_complex_value_t *disable_symlinks_from;
|
2012-02-13 13:29:04 -03:00
|
|
|
#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
|
|
|
|
2009-04-30 09:53:42 -04:00
|
|
|
ngx_log_t *error_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;
|
|
|
|
|
2008-05-24 10:46:46 -04:00
|
|
|
ngx_queue_t *locations;
|
|
|
|
|
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
|
|
|
|
|
|
|
|
2008-05-24 10:14:13 -04:00
|
|
|
typedef struct {
|
|
|
|
ngx_queue_t queue;
|
|
|
|
ngx_http_core_loc_conf_t *exact;
|
|
|
|
ngx_http_core_loc_conf_t *inclusive;
|
|
|
|
ngx_str_t *name;
|
|
|
|
u_char *file_name;
|
|
|
|
ngx_uint_t line;
|
|
|
|
ngx_queue_t list;
|
|
|
|
} ngx_http_location_queue_t;
|
|
|
|
|
|
|
|
|
|
|
|
struct ngx_http_location_tree_node_s {
|
|
|
|
ngx_http_location_tree_node_t *left;
|
|
|
|
ngx_http_location_tree_node_t *right;
|
|
|
|
ngx_http_location_tree_node_t *tree;
|
|
|
|
|
|
|
|
ngx_http_core_loc_conf_t *exact;
|
|
|
|
ngx_http_core_loc_conf_t *inclusive;
|
|
|
|
|
|
|
|
u_char auto_redirect;
|
|
|
|
u_char len;
|
|
|
|
u_char name[1];
|
|
|
|
};
|
|
|
|
|
|
|
|
|
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);
|
2010-06-18 11:16:18 -04:00
|
|
|
ngx_int_t ngx_http_core_rewrite_phase(ngx_http_request_t *r,
|
|
|
|
ngx_http_phase_handler_t *ph);
|
2006-08-30 06:39:17 -04:00
|
|
|
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
|
|
|
|
2008-08-04 07:29:09 -04:00
|
|
|
|
|
|
|
void *ngx_http_test_content_type(ngx_http_request_t *r, ngx_hash_t *types_hash);
|
2003-11-30 17:03:18 -03:00
|
|
|
ngx_int_t ngx_http_set_content_type(ngx_http_request_t *r);
|
2009-07-14 04:38:28 -04:00
|
|
|
void ngx_http_set_exten(ngx_http_request_t *r);
|
2012-07-08 20:13:06 -04:00
|
|
|
ngx_int_t ngx_http_set_etag(ngx_http_request_t *r);
|
2014-06-25 18:21:01 -04:00
|
|
|
void ngx_http_weak_etag(ngx_http_request_t *r);
|
2010-06-18 11:08:44 -04:00
|
|
|
ngx_int_t ngx_http_send_response(ngx_http_request_t *r, ngx_uint_t status,
|
|
|
|
ngx_str_t *ct, ngx_http_complex_value_t *cv);
|
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-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,
|
2021-10-12 17:18:18 -03:00
|
|
|
ngx_str_t *uri, ngx_str_t *args, ngx_http_request_t **psr,
|
|
|
|
ngx_http_post_subrequest_t *ps, 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);
|
2015-03-23 15:09:19 -03:00
|
|
|
typedef ngx_int_t (*ngx_http_request_body_filter_pt)
|
|
|
|
(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);
|
2015-03-23 15:09:19 -03:00
|
|
|
ngx_int_t ngx_http_request_body_save_filter(ngx_http_request_t *r,
|
2016-03-30 05:52:16 -03:00
|
|
|
ngx_chain_t *chain);
|
2004-06-06 15:49:18 -04:00
|
|
|
|
|
|
|
|
2012-02-27 13:51:28 -03:00
|
|
|
ngx_int_t ngx_http_set_disable_symlinks(ngx_http_request_t *r,
|
|
|
|
ngx_http_core_loc_conf_t *clcf, ngx_str_t *path, ngx_open_file_info_t *of);
|
|
|
|
|
2012-05-14 08:27:41 -04:00
|
|
|
ngx_int_t ngx_http_get_forwarded_addr(ngx_http_request_t *r, ngx_addr_t *addr,
|
2022-05-30 14:25:33 -04:00
|
|
|
ngx_table_elt_t *headers, ngx_str_t *value, ngx_array_t *proxies,
|
2013-02-27 10:29:50 -03:00
|
|
|
int recursive);
|
2012-05-14 08:27:41 -04:00
|
|
|
|
2022-05-30 14:25:27 -04:00
|
|
|
ngx_int_t ngx_http_link_multi_headers(ngx_http_request_t *r);
|
|
|
|
|
2012-02-27 13:51:28 -03: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;
|
|
|
|
|
2009-04-15 05:53:22 -04:00
|
|
|
extern ngx_str_t ngx_http_core_get_method;
|
|
|
|
|
2005-11-15 10:30:52 -03:00
|
|
|
|
|
|
|
#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; \
|
|
|
|
}
|
2014-08-15 06:09:29 -04:00
|
|
|
|
2005-11-15 10:30:52 -03:00
|
|
|
#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) { \
|
2008-05-22 08:09:41 -04:00
|
|
|
r->headers_out.accept_ranges->hash = 0; \
|
2005-11-15 10:30:52 -03:00
|
|
|
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; \
|
|
|
|
}
|
|
|
|
|
2011-10-12 10:28:03 -03:00
|
|
|
#define ngx_http_clear_location(r) \
|
|
|
|
\
|
|
|
|
if (r->headers_out.location) { \
|
|
|
|
r->headers_out.location->hash = 0; \
|
|
|
|
r->headers_out.location = NULL; \
|
|
|
|
}
|
|
|
|
|
2012-07-07 17:22:27 -04:00
|
|
|
#define ngx_http_clear_etag(r) \
|
|
|
|
\
|
|
|
|
if (r->headers_out.etag) { \
|
|
|
|
r->headers_out.etag->hash = 0; \
|
|
|
|
r->headers_out.etag = NULL; \
|
|
|
|
}
|
|
|
|
|
2005-11-15 10:30:52 -03:00
|
|
|
|
2003-01-09 02:36:00 -03:00
|
|
|
#endif /* _NGX_HTTP_CORE_H_INCLUDED_ */
|