nginx-quic/src/http/ngx_http_core_module.h

384 lines
12 KiB
C
Raw Normal View History

/*
* Copyright (C) Igor Sysoev
*/
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>
typedef struct {
unsigned default_server:1;
unsigned bind:1;
int backlog;
int rcvbuf;
int sndbuf;
#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
u_char addr[INET_ADDRSTRLEN + 6];
} ngx_http_listen_conf_t;
2003-01-09 02:36:00 -03:00
typedef struct {
in_addr_t addr;
in_port_t port;
int family;
2007-09-15 13:11:06 -04:00
u_char *file_name;
ngx_uint_t line;
2004-03-16 03:10:12 -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,
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,
NGX_HTTP_REWRITE_PHASE,
NGX_HTTP_POST_REWRITE_PHASE,
2004-06-24 12:07:04 -04:00
NGX_HTTP_PREACCESS_PHASE,
2004-06-24 12:07:04 -04:00
NGX_HTTP_ACCESS_PHASE,
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
NGX_HTTP_LOG_PHASE
2003-11-30 17:03:18 -03:00
} ngx_http_phases;
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;
} ngx_http_phase_engine_t;
2003-11-30 17:03:18 -03:00
2003-05-16 11:27:48 -04:00
typedef struct {
ngx_array_t handlers;
2003-10-10 11:10:50 -04:00
} ngx_http_phase_t;
typedef struct {
ngx_array_t servers; /* ngx_http_core_srv_conf_t */
ngx_http_phase_engine_t phase_engine;
2003-10-10 11:10:50 -04:00
ngx_hash_t headers_in_hash;
ngx_hash_t variables_hash;
ngx_array_t variables; /* ngx_http_variable_t */
ngx_uint_t server_names_hash_max_size;
ngx_uint_t server_names_hash_bucket_size;
ngx_uint_t variables_hash_max_size;
ngx_uint_t variables_hash_bucket_size;
ngx_hash_keys_arrays_t *variables_keys;
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
/*
* 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
*/
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
unsigned wildcard:1;
/* array of the ngx_http_listen_t, "listen" directive */
ngx_array_t listen;
2003-05-23 07:53:01 -04:00
/* array of the ngx_http_server_name_t, "server_name" directive */
ngx_array_t server_names;
2004-03-16 03:10:12 -04:00
2004-07-15 12:35:51 -04:00
/* server ctx */
ngx_http_conf_ctx_t *ctx;
2004-03-16 03:10:12 -04:00
ngx_str_t server_name;
size_t connection_pool_size;
size_t request_pool_size;
size_t client_header_buffer_size;
2004-05-14 12:51:47 -04:00
ngx_bufs_t large_client_header_buffers;
ngx_msec_t client_header_timeout;
2004-07-15 12:35:51 -04:00
ngx_flag_t optimize_server_names;
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
typedef struct {
in_addr_t addr;
2007-08-12 15:48:12 -04: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
ngx_http_virtual_names_t *virtual_names;
} ngx_http_in_addr_t;
2003-01-09 02:36:00 -03:00
typedef struct {
in_port_t port;
ngx_str_t port_text;
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
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;
ngx_hash_t hash;
ngx_hash_wildcard_t *wc_head;
ngx_hash_wildcard_t *wc_tail;
ngx_array_t names; /* array of ngx_http_server_name_t */
2007-08-12 15:48:12 -04:00
#if (NGX_PCRE)
ngx_uint_t nregex;
ngx_http_server_name_t *regex;
#endif
/* 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
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
typedef struct {
ngx_int_t status;
ngx_int_t overwrite;
ngx_str_t uri;
ngx_array_t *uri_lengths;
ngx_array_t *uri_values;
} 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
#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;
2004-07-18 15:11:20 -04:00
unsigned exact_match:1;
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 */
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
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
ngx_str_t root; /* root, alias */
ngx_str_t post_action;
ngx_array_t *root_lengths;
ngx_array_t *root_values;
ngx_array_t *types;
ngx_hash_t types_hash;
ngx_str_t default_type;
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
time_t keepalive_header; /* keepalive_timeout */
ngx_flag_t satisfy_any; /* satisfy_any */
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 */
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 */
ngx_flag_t tcp_nodelay; /* tcp_nodelay */
2004-06-06 15:49:18 -04:00
ngx_flag_t reset_timedout_connection; /* reset_timedout_connection */
ngx_flag_t port_in_redirect; /* port_in_redirect */
2004-03-16 03:10:12 -04:00
ngx_flag_t msie_padding; /* msie_padding */
ngx_flag_t msie_refresh; /* msie_refresh */
ngx_flag_t log_not_found; /* log_not_found */
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
ngx_array_t *error_pages; /* error_page */
2003-10-24 03:53:41 -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;
time_t open_file_cache_valid;
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
ngx_uint_t types_hash_max_size;
ngx_uint_t types_hash_bucket_size;
#if 0
2004-07-18 15:11:20 -04:00
ngx_http_core_loc_conf_t *prev_location;
#endif
2004-07-18 15:11:20 -04:00
};
2003-01-09 02:36:00 -03: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);
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);
ngx_int_t ngx_http_auth_basic_user(ngx_http_request_t *r);
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,
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,
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);
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)
(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
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) \
\
r->allow_ranges = 0; \
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_ */