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-05-19 12:39:14 -04:00
|
|
|
#ifndef _NGX_HTTP_REQUEST_H_INCLUDED_
|
|
|
|
#define _NGX_HTTP_REQUEST_H_INCLUDED_
|
|
|
|
|
|
|
|
|
2004-09-23 02:32:00 -04:00
|
|
|
#define NGX_HTTP_DISCARD_BUFFER_SIZE 4096
|
|
|
|
#define NGX_HTTP_LINGERING_BUFFER_SIZE 4096
|
|
|
|
|
|
|
|
|
2004-03-16 03:10:12 -04:00
|
|
|
#define NGX_HTTP_VERSION_9 9
|
|
|
|
#define NGX_HTTP_VERSION_10 1000
|
|
|
|
#define NGX_HTTP_VERSION_11 1001
|
2003-05-19 12:39:14 -04:00
|
|
|
|
2004-03-16 03:10:12 -04:00
|
|
|
#define NGX_HTTP_GET 1
|
|
|
|
#define NGX_HTTP_HEAD 2
|
|
|
|
#define NGX_HTTP_POST 3
|
2003-05-19 12:39:14 -04:00
|
|
|
|
2004-03-16 03:10:12 -04:00
|
|
|
#define NGX_HTTP_CONNECTION_CLOSE 1
|
|
|
|
#define NGX_HTTP_CONNECTION_KEEP_ALIVE 2
|
2003-05-19 12:39:14 -04:00
|
|
|
|
|
|
|
|
2004-03-16 03:10:12 -04:00
|
|
|
#define NGX_NONE 1
|
2003-10-08 11:32:54 -04:00
|
|
|
|
|
|
|
|
2004-03-16 03:10:12 -04:00
|
|
|
#define NGX_HTTP_PARSE_HEADER_DONE 1
|
2003-10-27 05:53:49 -03:00
|
|
|
|
2004-03-16 03:10:12 -04:00
|
|
|
#define NGX_HTTP_CLIENT_ERROR 10
|
|
|
|
#define NGX_HTTP_PARSE_INVALID_METHOD 10
|
|
|
|
#define NGX_HTTP_PARSE_INVALID_REQUEST 11
|
|
|
|
#define NGX_HTTP_PARSE_TOO_LONG_URI 12
|
|
|
|
#define NGX_HTTP_PARSE_INVALID_09_METHOD 13
|
2003-10-27 05:53:49 -03:00
|
|
|
|
2004-03-16 03:10:12 -04:00
|
|
|
#define NGX_HTTP_PARSE_HEADER_ERROR 14
|
|
|
|
#define NGX_HTTP_PARSE_INVALID_HEADER 14
|
|
|
|
#define NGX_HTTP_PARSE_TOO_LONG_HEADER 15
|
2004-10-21 12:34:38 -03:00
|
|
|
#define NGX_HTTP_PARSE_NO_HOST_HEADER 16
|
|
|
|
#define NGX_HTTP_PARSE_INVALID_CL_HEADER 17
|
|
|
|
#define NGX_HTTP_PARSE_POST_WO_CL_HEADER 18
|
2004-11-11 11:07:14 -03:00
|
|
|
|
|
|
|
#define NGX_HTTP_PARSE_INVALID_HOST 19
|
|
|
|
#define NGX_HTTP_PARSE_HTTP_TO_HTTPS 20
|
2003-05-19 12:39:14 -04:00
|
|
|
|
|
|
|
|
2003-10-27 18:01:00 -03:00
|
|
|
#define NGX_HTTP_OK 200
|
|
|
|
#define NGX_HTTP_PARTIAL_CONTENT 206
|
|
|
|
|
|
|
|
#define NGX_HTTP_SPECIAL_RESPONSE 300
|
|
|
|
#define NGX_HTTP_MOVED_PERMANENTLY 301
|
|
|
|
#define NGX_HTTP_MOVED_TEMPORARILY 302
|
|
|
|
#define NGX_HTTP_NOT_MODIFIED 304
|
|
|
|
|
|
|
|
#define NGX_HTTP_BAD_REQUEST 400
|
|
|
|
#define NGX_HTTP_FORBIDDEN 403
|
|
|
|
#define NGX_HTTP_NOT_FOUND 404
|
|
|
|
#define NGX_HTTP_NOT_ALLOWED 405
|
|
|
|
#define NGX_HTTP_REQUEST_TIME_OUT 408
|
|
|
|
#define NGX_HTTP_REQUEST_ENTITY_TOO_LARGE 413
|
|
|
|
#define NGX_HTTP_REQUEST_URI_TOO_LARGE 414
|
|
|
|
#define NGX_HTTP_RANGE_NOT_SATISFIABLE 416
|
|
|
|
|
2004-05-14 12:51:47 -04:00
|
|
|
|
|
|
|
/* Our own HTTP codes */
|
|
|
|
|
2004-07-09 03:12:14 -04:00
|
|
|
#define NGX_HTTP_NGX_CODES NGX_HTTP_TO_HTTPS
|
|
|
|
|
|
|
|
/*
|
|
|
|
* We use the special code for the plain HTTP requests that are sent to
|
|
|
|
* HTTPS port to distinguish it from 4XX in an error page redirection
|
|
|
|
*/
|
|
|
|
#define NGX_HTTP_TO_HTTPS 497
|
2004-05-14 12:51:47 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* We use the special code for the requests with invalid host name
|
|
|
|
* to distinguish it from 4XX in an error page redirection
|
|
|
|
*/
|
|
|
|
#define NGX_HTTP_INVALID_HOST 498
|
|
|
|
|
2003-11-18 13:49:00 -03:00
|
|
|
/*
|
2004-01-18 18:09:21 -03:00
|
|
|
* HTTP does not define the code for the case when a client closed
|
|
|
|
* the connection while we are processing its request so we introduce
|
|
|
|
* own code to log such situation when a client has closed the connection
|
|
|
|
* before we even try to send the HTTP header to it
|
2003-11-18 13:49:00 -03:00
|
|
|
*/
|
2003-11-18 18:34:08 -03:00
|
|
|
#define NGX_HTTP_CLIENT_CLOSED_REQUEST 499
|
2003-11-18 13:49:00 -03:00
|
|
|
|
2004-05-14 12:51:47 -04:00
|
|
|
|
2003-10-27 18:01:00 -03:00
|
|
|
#define NGX_HTTP_INTERNAL_SERVER_ERROR 500
|
|
|
|
#define NGX_HTTP_NOT_IMPLEMENTED 501
|
|
|
|
#define NGX_HTTP_BAD_GATEWAY 502
|
|
|
|
#define NGX_HTTP_SERVICE_UNAVAILABLE 503
|
|
|
|
#define NGX_HTTP_GATEWAY_TIME_OUT 504
|
2003-05-19 12:39:14 -04:00
|
|
|
|
|
|
|
|
2004-05-14 12:51:47 -04:00
|
|
|
typedef enum {
|
|
|
|
NGX_HTTP_RESTRICT_HOST_OFF = 0,
|
|
|
|
NGX_HTTP_RESTRICT_HOST_ON,
|
|
|
|
NGX_HTTP_RESTRICT_HOST_CLOSE
|
|
|
|
} ngx_http_restrict_host_e;
|
|
|
|
|
|
|
|
|
2003-12-25 17:26:58 -03:00
|
|
|
typedef enum {
|
|
|
|
NGX_HTTP_INITING_REQUEST_STATE = 0,
|
|
|
|
NGX_HTTP_READING_REQUEST_STATE,
|
|
|
|
NGX_HTTP_PROCESS_REQUEST_STATE,
|
2003-05-19 12:39:14 -04:00
|
|
|
|
2003-12-25 17:26:58 -03:00
|
|
|
NGX_HTTP_CONNECT_UPSTREAM_STATE,
|
|
|
|
NGX_HTTP_WRITING_UPSTREAM_STATE,
|
|
|
|
NGX_HTTP_READING_UPSTREAM_STATE,
|
|
|
|
|
|
|
|
NGX_HTTP_WRITING_REQUEST_STATE,
|
|
|
|
NGX_HTTP_LINGERING_CLOSE_STATE,
|
|
|
|
NGX_HTTP_KEEPALIVE_STATE
|
|
|
|
} ngx_http_state_e;
|
2003-05-19 12:39:14 -04:00
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2004-03-16 03:10:12 -04:00
|
|
|
ngx_str_t name;
|
|
|
|
ngx_uint_t offset;
|
2003-05-19 12:39:14 -04:00
|
|
|
} ngx_http_header_t;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2004-09-05 15:54:02 -04:00
|
|
|
ngx_list_t headers;
|
2003-10-29 05:30:44 -03:00
|
|
|
|
2003-05-19 12:39:14 -04:00
|
|
|
ngx_table_elt_t *host;
|
|
|
|
ngx_table_elt_t *connection;
|
|
|
|
ngx_table_elt_t *if_modified_since;
|
2003-10-22 13:38:26 -03:00
|
|
|
ngx_table_elt_t *user_agent;
|
2003-11-09 17:03:38 -03:00
|
|
|
ngx_table_elt_t *referer;
|
2003-10-22 13:38:26 -03:00
|
|
|
ngx_table_elt_t *content_length;
|
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_table_elt_t *content_type;
|
2004-03-12 13:57:08 -03:00
|
|
|
|
2003-10-22 13:38:26 -03:00
|
|
|
ngx_table_elt_t *range;
|
2003-05-19 12:39:14 -04:00
|
|
|
|
2004-03-12 13:57:08 -03:00
|
|
|
#if (NGX_HTTP_GZIP)
|
|
|
|
ngx_table_elt_t *accept_encoding;
|
2004-04-13 11:08:48 -04:00
|
|
|
ngx_table_elt_t *via;
|
2004-03-12 13:57:08 -03:00
|
|
|
#endif
|
|
|
|
|
2003-11-03 19:20:44 -03:00
|
|
|
ngx_table_elt_t *authorization;
|
|
|
|
|
2003-10-20 14:14:07 -03:00
|
|
|
ngx_table_elt_t *keep_alive;
|
2003-05-19 12:39:14 -04:00
|
|
|
|
2004-03-12 13:57:08 -03:00
|
|
|
#if (NGX_HTTP_PROXY)
|
|
|
|
ngx_table_elt_t *x_forwarded_for;
|
2004-10-25 12:29:23 -03:00
|
|
|
ngx_table_elt_t *x_real_ip;
|
|
|
|
ngx_table_elt_t *x_url;
|
2004-03-12 13:57:08 -03:00
|
|
|
#endif
|
|
|
|
|
2005-02-16 10:40:36 -03:00
|
|
|
#if (NGX_HTTP_HEADERS)
|
|
|
|
ngx_table_elt_t *accept;
|
|
|
|
ngx_table_elt_t *accept_language;
|
|
|
|
#endif
|
|
|
|
|
2004-08-27 11:40:59 -04:00
|
|
|
ngx_array_t cookies;
|
|
|
|
|
2003-10-21 13:49:56 -03:00
|
|
|
size_t host_name_len;
|
|
|
|
ssize_t content_length_n;
|
|
|
|
size_t connection_type;
|
|
|
|
ssize_t keep_alive_n;
|
2004-06-16 11:32:11 -04:00
|
|
|
|
2004-09-14 15:39:54 -04:00
|
|
|
unsigned msie:1;
|
|
|
|
unsigned msie4:1;
|
2004-09-15 12:00:43 -04:00
|
|
|
unsigned opera:1;
|
2004-09-17 12:07:35 -04:00
|
|
|
unsigned gecko:1;
|
|
|
|
unsigned konqueror:1;
|
2003-05-19 12:39:14 -04:00
|
|
|
} ngx_http_headers_in_t;
|
|
|
|
|
|
|
|
|
2003-06-02 11:24:30 -04:00
|
|
|
typedef struct {
|
2004-03-16 03:10:12 -04:00
|
|
|
off_t start;
|
|
|
|
off_t end;
|
|
|
|
ngx_str_t content_range;
|
2003-06-02 11:24:30 -04:00
|
|
|
} ngx_http_range_t;
|
|
|
|
|
|
|
|
|
2003-05-19 12:39:14 -04:00
|
|
|
typedef struct {
|
2004-09-05 15:54:02 -04:00
|
|
|
ngx_list_t headers;
|
2003-10-29 05:30:44 -03:00
|
|
|
|
2004-03-29 13:43:58 -04:00
|
|
|
ngx_uint_t status;
|
2003-05-19 12:39:14 -04:00
|
|
|
ngx_str_t status_line;
|
|
|
|
|
|
|
|
ngx_table_elt_t *server;
|
|
|
|
ngx_table_elt_t *date;
|
|
|
|
ngx_table_elt_t *content_type;
|
2003-10-21 13:49:56 -03:00
|
|
|
ngx_table_elt_t *content_length;
|
2003-09-28 15:29:06 -04:00
|
|
|
ngx_table_elt_t *content_encoding;
|
2003-05-19 12:39:14 -04:00
|
|
|
ngx_table_elt_t *location;
|
|
|
|
ngx_table_elt_t *last_modified;
|
2003-06-02 11:24:30 -04:00
|
|
|
ngx_table_elt_t *content_range;
|
2003-10-02 01:39:37 -04:00
|
|
|
ngx_table_elt_t *accept_ranges;
|
2004-04-14 13:44:28 -04:00
|
|
|
ngx_table_elt_t *expires;
|
|
|
|
ngx_table_elt_t *cache_control;
|
|
|
|
ngx_table_elt_t *etag;
|
2003-06-02 11:24:30 -04:00
|
|
|
|
|
|
|
ngx_str_t charset;
|
|
|
|
ngx_array_t ranges;
|
2003-05-19 12:39:14 -04:00
|
|
|
|
2003-10-21 13:49:56 -03:00
|
|
|
off_t content_length_n;
|
2003-05-19 12:39:14 -04:00
|
|
|
time_t date_time;
|
|
|
|
time_t last_modified_time;
|
|
|
|
} ngx_http_headers_out_t;
|
|
|
|
|
|
|
|
|
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
|
|
|
typedef void (*ngx_http_client_body_handler_pt)(ngx_http_request_t *r);
|
|
|
|
|
2004-03-29 13:43:58 -04:00
|
|
|
typedef struct {
|
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_temp_file_t *temp_file;
|
|
|
|
ngx_chain_t *bufs;
|
|
|
|
ngx_buf_t *buf;
|
|
|
|
size_t rest;
|
|
|
|
ngx_http_client_body_handler_pt post_handler;
|
2004-03-29 13:43:58 -04:00
|
|
|
} ngx_http_request_body_t;
|
|
|
|
|
|
|
|
|
2003-11-30 17:03:18 -03:00
|
|
|
struct ngx_http_cleanup_s {
|
2003-11-28 14:41:47 -03:00
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
ngx_fd_t fd;
|
2004-03-16 03:10:12 -04:00
|
|
|
u_char *name;
|
2003-11-28 14:41:47 -03:00
|
|
|
} file;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
ngx_http_cache_hash_t *hash;
|
2004-11-25 13:17:31 -03:00
|
|
|
ngx_http_cache_entry_t *cache;
|
2003-11-28 14:41:47 -03:00
|
|
|
} cache;
|
|
|
|
} data;
|
|
|
|
|
2003-11-30 17:03:18 -03:00
|
|
|
unsigned valid:1;
|
2003-11-28 14:41:47 -03:00
|
|
|
unsigned cache:1;
|
2003-11-30 17:03:18 -03:00
|
|
|
};
|
2003-11-28 14:41:47 -03:00
|
|
|
|
|
|
|
|
2004-09-21 01:38:28 -04:00
|
|
|
typedef struct {
|
2004-09-21 11:47:05 -04:00
|
|
|
ngx_http_request_t *request;
|
|
|
|
|
|
|
|
ngx_buf_t **busy;
|
2004-09-22 12:18:21 -04:00
|
|
|
ngx_int_t nbusy;
|
2004-09-21 11:47:05 -04:00
|
|
|
|
|
|
|
ngx_buf_t **free;
|
2004-09-22 12:18:21 -04:00
|
|
|
ngx_int_t nfree;
|
2004-09-21 11:47:05 -04:00
|
|
|
|
|
|
|
ngx_uint_t pipeline; /* unsigned pipeline:1; */
|
2004-09-21 01:38:28 -04:00
|
|
|
} ngx_http_connection_t;
|
|
|
|
|
|
|
|
|
2004-06-16 11:32:11 -04:00
|
|
|
typedef ngx_int_t (*ngx_http_handler_pt)(ngx_http_request_t *r);
|
2003-10-10 11:10:50 -04:00
|
|
|
|
2003-05-19 12:39:14 -04:00
|
|
|
struct ngx_http_request_s {
|
2004-06-24 03:53:37 -04:00
|
|
|
uint32_t signature; /* "HTTP" */
|
|
|
|
|
2003-11-28 14:41:47 -03:00
|
|
|
ngx_connection_t *connection;
|
2003-05-19 12:39:14 -04:00
|
|
|
|
2003-11-28 14:41:47 -03:00
|
|
|
void **ctx;
|
|
|
|
void **main_conf;
|
|
|
|
void **srv_conf;
|
|
|
|
void **loc_conf;
|
2003-05-19 12:39:14 -04:00
|
|
|
|
2004-12-21 09:30:30 -03:00
|
|
|
ngx_http_cache_t *cache;
|
2003-11-27 04:45:22 -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_http_upstream_t *upstream;
|
|
|
|
|
2004-03-29 13:43:58 -04:00
|
|
|
ngx_file_t file;
|
2003-05-19 12:39:14 -04:00
|
|
|
|
|
|
|
ngx_pool_t *pool;
|
2004-05-28 11:49:23 -04:00
|
|
|
ngx_buf_t *header_in;
|
2003-05-19 12:39:14 -04:00
|
|
|
|
|
|
|
ngx_http_headers_in_t headers_in;
|
|
|
|
ngx_http_headers_out_t headers_out;
|
|
|
|
|
2004-03-29 13:43:58 -04:00
|
|
|
ngx_http_request_body_t *request_body;
|
|
|
|
|
2005-03-01 12:20:36 -03:00
|
|
|
time_t lingering_time;
|
|
|
|
time_t start_time;
|
2003-05-19 12:39:14 -04:00
|
|
|
|
2004-03-16 03:10:12 -04:00
|
|
|
ngx_uint_t method;
|
|
|
|
ngx_uint_t http_version;
|
|
|
|
ngx_uint_t http_major;
|
|
|
|
ngx_uint_t http_minor;
|
2003-05-19 12:39:14 -04:00
|
|
|
|
|
|
|
ngx_str_t request_line;
|
|
|
|
ngx_str_t uri;
|
|
|
|
ngx_str_t args;
|
|
|
|
ngx_str_t exten;
|
|
|
|
ngx_str_t unparsed_uri;
|
|
|
|
|
2004-04-14 01:57:36 -04:00
|
|
|
ngx_str_t method_name;
|
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_str_t http_protocol;
|
2004-04-14 01:57:36 -04:00
|
|
|
|
2003-05-19 12:39:14 -04:00
|
|
|
ngx_http_request_t *main;
|
|
|
|
|
2004-03-16 03:10:12 -04:00
|
|
|
uint32_t in_addr;
|
|
|
|
ngx_uint_t port;
|
2004-09-13 12:18:09 -04:00
|
|
|
ngx_str_t *port_text; /* ":80" */
|
2004-10-25 12:29:23 -03:00
|
|
|
ngx_str_t server_name;
|
2004-12-21 09:30:30 -03:00
|
|
|
ngx_http_in_addr_t *virtual_names;
|
2003-05-19 12:39:14 -04:00
|
|
|
|
2004-03-16 03:10:12 -04:00
|
|
|
ngx_uint_t phase;
|
|
|
|
ngx_int_t phase_handler;
|
2003-10-10 11:10:50 -04:00
|
|
|
ngx_http_handler_pt content_handler;
|
2003-05-19 12:39:14 -04:00
|
|
|
|
2005-02-03 16:33:37 -03:00
|
|
|
ngx_uint_t nvariables;
|
|
|
|
void **variables;
|
|
|
|
|
2003-11-28 14:41:47 -03:00
|
|
|
ngx_array_t cleanup;
|
|
|
|
|
2004-03-29 13:43:58 -04:00
|
|
|
/* used to learn the Apache compatible response length without a header */
|
2003-12-14 17:10:27 -03:00
|
|
|
size_t header_size;
|
|
|
|
|
2004-12-06 11:45:08 -03:00
|
|
|
size_t request_length;
|
|
|
|
|
2004-03-16 03:10:12 -04:00
|
|
|
u_char *discarded_buffer;
|
2003-11-10 18:09:22 -03:00
|
|
|
void **err_ctx;
|
2004-03-16 03:10:12 -04:00
|
|
|
ngx_uint_t err_status;
|
2003-05-19 12:39:14 -04:00
|
|
|
|
2004-09-21 01:38:28 -04:00
|
|
|
ngx_http_connection_t *http_connection;
|
|
|
|
|
2003-12-25 17:26:58 -03:00
|
|
|
unsigned http_state:4;
|
|
|
|
|
2004-10-11 12:07:03 -03:00
|
|
|
/* URI with "/." and on Win32 with "//" */
|
2003-06-02 11:24:30 -04:00
|
|
|
unsigned complex_uri:1;
|
2005-02-03 16:33:37 -03:00
|
|
|
|
2004-10-11 12:07:03 -03:00
|
|
|
/* URI with "%" */
|
|
|
|
unsigned quoted_uri:1;
|
2005-02-03 16:33:37 -03:00
|
|
|
|
|
|
|
/* URI with "+" */
|
|
|
|
unsigned plus_in_uri:1;
|
|
|
|
|
2005-02-16 10:40:36 -03:00
|
|
|
/* URI with "\0" or "%00" */
|
|
|
|
unsigned zero_in_uri:1;
|
|
|
|
|
2005-02-03 16:33:37 -03:00
|
|
|
unsigned uri_changed:1;
|
|
|
|
unsigned uri_changes:4;
|
|
|
|
|
|
|
|
unsigned low_case_exten:1;
|
2003-06-02 11:24:30 -04:00
|
|
|
unsigned header_timeout_set:1;
|
2003-05-19 12:39:14 -04:00
|
|
|
|
2003-06-02 11:24:30 -04:00
|
|
|
unsigned proxy:1;
|
2003-11-02 19:56:18 -03:00
|
|
|
unsigned bypass_cache:1;
|
2003-11-03 19:20:44 -03:00
|
|
|
unsigned no_cache:1;
|
2003-11-02 19:56:18 -03:00
|
|
|
|
2003-06-02 11:24:30 -04:00
|
|
|
#if 0
|
|
|
|
unsigned cachable:1;
|
2003-05-19 12:39:14 -04:00
|
|
|
#endif
|
2003-06-02 11:24:30 -04:00
|
|
|
unsigned pipeline:1;
|
|
|
|
|
2004-07-16 13:11:43 -04:00
|
|
|
unsigned plain_http:1;
|
2003-06-02 11:24:30 -04:00
|
|
|
unsigned chunked:1;
|
|
|
|
unsigned header_only:1;
|
|
|
|
unsigned keepalive:1;
|
|
|
|
unsigned lingering_close:1;
|
2003-10-10 11:10:50 -04:00
|
|
|
unsigned closed:1;
|
2003-06-02 11:24:30 -04:00
|
|
|
|
2004-06-06 15:49:18 -04:00
|
|
|
unsigned filter_need_in_memory:1;
|
|
|
|
unsigned filter_ssi_need_in_memory:1;
|
|
|
|
unsigned filter_need_temporary:1;
|
|
|
|
unsigned filter_allow_ranges:1;
|
2003-06-02 11:24:30 -04:00
|
|
|
|
2004-09-15 12:00:43 -04:00
|
|
|
#if (NGX_STAT_STUB)
|
|
|
|
unsigned stat_reading:1;
|
|
|
|
unsigned stat_writing:1;
|
|
|
|
#endif
|
|
|
|
|
2004-09-05 15:54:02 -04:00
|
|
|
ngx_uint_t headers_n;
|
|
|
|
|
2003-06-02 11:24:30 -04:00
|
|
|
/* used to parse HTTP headers */
|
2004-09-09 11:40:48 -04:00
|
|
|
ngx_uint_t state;
|
2004-03-16 03:10:12 -04:00
|
|
|
u_char *uri_start;
|
|
|
|
u_char *uri_end;
|
|
|
|
u_char *uri_ext;
|
|
|
|
u_char *args_start;
|
|
|
|
u_char *request_start;
|
|
|
|
u_char *request_end;
|
2004-04-14 01:57:36 -04:00
|
|
|
u_char *method_end;
|
|
|
|
u_char *schema_start;
|
|
|
|
u_char *schema_end;
|
|
|
|
u_char *host_start;
|
|
|
|
u_char *host_end;
|
|
|
|
u_char *port_start;
|
|
|
|
u_char *port_end;
|
2004-03-16 03:10:12 -04:00
|
|
|
u_char *header_name_start;
|
|
|
|
u_char *header_name_end;
|
|
|
|
u_char *header_start;
|
|
|
|
u_char *header_end;
|
2003-05-19 12:39:14 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2003-10-29 05:30:44 -03:00
|
|
|
extern ngx_http_header_t ngx_http_headers_in[];
|
|
|
|
extern ngx_http_header_t ngx_http_headers_out[];
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-05-19 12:39:14 -04:00
|
|
|
#endif /* _NGX_HTTP_REQUEST_H_INCLUDED_ */
|