Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.h @ 509:9b8c906f6e63 release-0.1.29
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.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 12 May 2005 14:58:06 +0000 |
parents | cd3117ad9aab |
children | 417a087c9c4d |
comparison
equal
deleted
inserted
replaced
508:ca1020ce99ba | 509:9b8c906f6e63 |
---|---|
27 | 27 |
28 #define NGX_HTTP_UPSTREAM_INVALID_HEADER 40 | 28 #define NGX_HTTP_UPSTREAM_INVALID_HEADER 40 |
29 | 29 |
30 | 30 |
31 typedef struct { | 31 typedef struct { |
32 time_t bl_time; | 32 time_t bl_time; |
33 ngx_uint_t bl_state; | 33 ngx_uint_t bl_state; |
34 | 34 |
35 ngx_uint_t status; | 35 ngx_uint_t status; |
36 time_t time; | 36 time_t time; |
37 | 37 |
38 ngx_str_t *peer; | 38 ngx_str_t *peer; |
39 } ngx_http_upstream_state_t; | 39 } ngx_http_upstream_state_t; |
40 | 40 |
41 | 41 |
42 typedef struct { | 42 typedef struct { |
43 ngx_msec_t connect_timeout; | 43 ngx_hash_t headers_in_hash; |
44 ngx_msec_t send_timeout; | 44 } ngx_http_upstream_main_conf_t; |
45 ngx_msec_t read_timeout; | |
46 | 45 |
47 size_t send_lowat; | |
48 size_t header_buffer_size; | |
49 size_t busy_buffers_size; | |
50 size_t max_temp_file_size; | |
51 size_t temp_file_write_size; | |
52 | 46 |
53 ngx_uint_t next_upstream; | 47 typedef struct { |
48 ngx_msec_t connect_timeout; | |
49 ngx_msec_t send_timeout; | |
50 ngx_msec_t read_timeout; | |
54 | 51 |
55 ngx_bufs_t bufs; | 52 size_t send_lowat; |
53 size_t header_buffer_size; | |
54 size_t busy_buffers_size; | |
55 size_t max_temp_file_size; | |
56 size_t temp_file_write_size; | |
56 | 57 |
57 ngx_flag_t redirect_errors; | 58 ngx_uint_t next_upstream; |
58 ngx_flag_t pass_unparsed_uri; | 59 ngx_uint_t method; |
59 ngx_flag_t x_powered_by; | |
60 ngx_flag_t cyclic_temp_file; | |
61 | 60 |
62 ngx_path_t *temp_path; | 61 ngx_bufs_t bufs; |
62 | |
63 ngx_flag_t pass_request_headers; | |
64 ngx_flag_t pass_request_body; | |
65 | |
66 ngx_flag_t redirect_errors; | |
67 ngx_flag_t pass_unparsed_uri; | |
68 ngx_flag_t cyclic_temp_file; | |
69 | |
70 ngx_flag_t pass_x_powered_by; | |
71 ngx_flag_t pass_server; | |
72 ngx_flag_t pass_date; | |
73 ngx_flag_t pass_x_accel_expires; | |
74 | |
75 ngx_path_t *temp_path; | |
76 | |
77 ngx_str_t schema; | |
78 ngx_str_t uri; | |
79 ngx_str_t *location; | |
80 ngx_str_t url; /* used in proxy_rewrite_location */ | |
63 } ngx_http_upstream_conf_t; | 81 } ngx_http_upstream_conf_t; |
64 | 82 |
65 | 83 |
66 typedef struct ngx_http_upstream_s ngx_http_upstream_t; | 84 typedef struct { |
85 ngx_str_t name; | |
86 ngx_http_header_handler_pt handler; | |
87 ngx_uint_t offset; | |
88 ngx_http_header_handler_pt copy_handler; | |
89 ngx_uint_t conf; | |
90 } ngx_http_upstream_header_t; | |
91 | |
92 | |
93 typedef struct { | |
94 ngx_list_t headers; | |
95 | |
96 ngx_table_elt_t *status; | |
97 ngx_table_elt_t *date; | |
98 ngx_table_elt_t *server; | |
99 ngx_table_elt_t *connection; | |
100 | |
101 ngx_table_elt_t *expires; | |
102 ngx_table_elt_t *etag; | |
103 ngx_table_elt_t *x_accel_expires; | |
104 | |
105 ngx_table_elt_t *content_type; | |
106 ngx_table_elt_t *content_length; | |
107 | |
108 ngx_table_elt_t *last_modified; | |
109 ngx_table_elt_t *location; | |
110 ngx_table_elt_t *accept_ranges; | |
111 | |
112 #if (NGX_HTTP_GZIP) | |
113 ngx_table_elt_t *content_encoding; | |
114 #endif | |
115 | |
116 ngx_array_t cache_control; | |
117 } ngx_http_upstream_headers_in_t; | |
118 | |
67 | 119 |
68 struct ngx_http_upstream_s { | 120 struct ngx_http_upstream_s { |
69 ngx_http_request_t *request; | 121 ngx_http_request_t *request; |
70 | 122 |
71 ngx_peer_connection_t peer; | 123 ngx_peer_connection_t peer; |
72 | 124 |
73 ngx_event_pipe_t pipe; | 125 ngx_event_pipe_t pipe; |
74 | 126 |
75 ngx_output_chain_ctx_t output; | 127 ngx_chain_t *request_bufs; |
76 ngx_chain_writer_ctx_t writer; | |
77 | 128 |
78 ngx_http_upstream_conf_t *conf; | 129 ngx_output_chain_ctx_t output; |
130 ngx_chain_writer_ctx_t writer; | |
79 | 131 |
80 ngx_buf_t header_in; | 132 ngx_http_upstream_conf_t *conf; |
81 | 133 |
82 ngx_int_t (*create_request)(ngx_http_request_t *r); | 134 ngx_http_upstream_headers_in_t headers_in; |
83 ngx_int_t (*reinit_request)(ngx_http_request_t *r); | |
84 ngx_int_t (*process_header)(ngx_http_request_t *r); | |
85 ngx_int_t (*send_header)(ngx_http_request_t *r); | |
86 void (*abort_request)(ngx_http_request_t *r); | |
87 void (*finalize_request)(ngx_http_request_t *r, | |
88 ngx_int_t rc); | |
89 ngx_uint_t method; | |
90 | 135 |
91 ngx_str_t schema0; | 136 ngx_buf_t header_in; |
92 ngx_str_t uri0; | |
93 ngx_str_t *location0; | |
94 | 137 |
95 ngx_http_log_ctx_t *log_ctx; | 138 ngx_int_t (*create_request)(ngx_http_request_t *r); |
96 ngx_log_handler_pt log_handler; | 139 ngx_int_t (*reinit_request)(ngx_http_request_t *r); |
97 ngx_http_log_ctx_t *saved_log_ctx; | 140 ngx_int_t (*process_header)(ngx_http_request_t *r); |
98 ngx_log_handler_pt saved_log_handler; | 141 void (*abort_request)(ngx_http_request_t *r); |
142 void (*finalize_request)(ngx_http_request_t *r, | |
143 ngx_int_t rc); | |
144 ngx_int_t (*rewrite_redirect)(ngx_http_request_t *r, | |
145 ngx_table_elt_t *h, size_t prefix); | |
99 | 146 |
100 ngx_http_upstream_state_t *state; | 147 ngx_uint_t method; |
101 ngx_array_t states; /* of ngx_http_upstream_state_t */ | |
102 | 148 |
103 unsigned cachable:1; | 149 ngx_http_log_handler_pt saved_log_handler; |
104 | 150 |
105 unsigned request_sent:1; | 151 ngx_http_upstream_state_t *state; |
106 unsigned header_sent:1; | 152 ngx_array_t states; /* of ngx_http_upstream_state_t */ |
153 | |
154 unsigned cachable:1; | |
155 unsigned accel:1; | |
156 | |
157 unsigned request_sent:1; | |
158 unsigned header_sent:1; | |
107 }; | 159 }; |
108 | 160 |
109 | 161 |
110 void ngx_http_upstream_init(ngx_http_request_t *r); | 162 void ngx_http_upstream_init(ngx_http_request_t *r); |
111 u_char *ngx_http_upstream_log_error(ngx_log_t *log, u_char *buf, size_t len); | |
112 | 163 |
164 | |
165 extern ngx_module_t ngx_http_upstream_module; | |
113 | 166 |
114 extern char *ngx_http_upstream_header_errors[]; | 167 extern char *ngx_http_upstream_header_errors[]; |
115 | 168 |
116 | 169 |
117 #endif /* _NGX_HTTP_UPSTREAM_H_INCLUDED_ */ | 170 #endif /* _NGX_HTTP_UPSTREAM_H_INCLUDED_ */ |