Mercurial > hg > nginx-vendor-0-7
comparison src/http/ngx_http_request.c @ 28:7ca9bdc82b3f NGINX_0_1_14
nginx 0.1.14
*) 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; bug 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.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 18 Jan 2005 00:00:00 +0300 |
parents | 45fe5b98a9de |
children | da8c190bdaba |
comparison
equal
deleted
inserted
replaced
27:66901c2556fd | 28:7ca9bdc82b3f |
---|---|
61 offsetof(ngx_http_headers_in_t, if_modified_since) }, | 61 offsetof(ngx_http_headers_in_t, if_modified_since) }, |
62 { ngx_string("User-Agent"), offsetof(ngx_http_headers_in_t, user_agent) }, | 62 { ngx_string("User-Agent"), offsetof(ngx_http_headers_in_t, user_agent) }, |
63 { ngx_string("Referer"), offsetof(ngx_http_headers_in_t, referer) }, | 63 { ngx_string("Referer"), offsetof(ngx_http_headers_in_t, referer) }, |
64 { ngx_string("Content-Length"), | 64 { ngx_string("Content-Length"), |
65 offsetof(ngx_http_headers_in_t, content_length) }, | 65 offsetof(ngx_http_headers_in_t, content_length) }, |
66 { ngx_string("Content-Type"), | |
67 offsetof(ngx_http_headers_in_t, content_type) }, | |
66 | 68 |
67 { ngx_string("Range"), offsetof(ngx_http_headers_in_t, range) }, | 69 { ngx_string("Range"), offsetof(ngx_http_headers_in_t, range) }, |
68 #if 0 | 70 #if 0 |
69 { ngx_string("If-Range"), offsetof(ngx_http_headers_in_t, if_range) }, | 71 { ngx_string("If-Range"), offsetof(ngx_http_headers_in_t, if_range) }, |
70 #endif | 72 #endif |
84 { ngx_string("X-Forwarded-For"), | 86 { ngx_string("X-Forwarded-For"), |
85 offsetof(ngx_http_headers_in_t, x_forwarded_for) }, | 87 offsetof(ngx_http_headers_in_t, x_forwarded_for) }, |
86 { ngx_string("X-Real-IP"), offsetof(ngx_http_headers_in_t, x_real_ip) }, | 88 { ngx_string("X-Real-IP"), offsetof(ngx_http_headers_in_t, x_real_ip) }, |
87 { ngx_string("X-URL"), offsetof(ngx_http_headers_in_t, x_url) }, | 89 { ngx_string("X-URL"), offsetof(ngx_http_headers_in_t, x_url) }, |
88 #endif | 90 #endif |
89 | 91 |
90 { ngx_null_string, 0 } | 92 { ngx_null_string, 0 } |
91 }; | 93 }; |
92 | 94 |
93 | 95 |
94 #if 0 | 96 #if 0 |
173 | 175 |
174 static void ngx_http_init_request(ngx_event_t *rev) | 176 static void ngx_http_init_request(ngx_event_t *rev) |
175 { | 177 { |
176 ngx_uint_t i; | 178 ngx_uint_t i; |
177 socklen_t len; | 179 socklen_t len; |
178 struct sockaddr_in addr_in; | 180 struct sockaddr_in sin; |
179 ngx_connection_t *c; | 181 ngx_connection_t *c; |
180 ngx_http_request_t *r; | 182 ngx_http_request_t *r; |
181 ngx_http_in_port_t *in_port; | 183 ngx_http_in_port_t *in_port; |
182 ngx_http_in_addr_t *in_addr; | 184 ngx_http_in_addr_t *in_addr; |
183 ngx_http_connection_t *hc; | 185 ngx_http_connection_t *hc; |
281 #if (NGX_WIN32) | 283 #if (NGX_WIN32) |
282 if (c->local_sockaddr) { | 284 if (c->local_sockaddr) { |
283 r->in_addr = | 285 r->in_addr = |
284 ((struct sockaddr_in *) c->local_sockaddr)->sin_addr.s_addr; | 286 ((struct sockaddr_in *) c->local_sockaddr)->sin_addr.s_addr; |
285 | 287 |
286 } else { | 288 } else |
287 #endif | 289 #endif |
290 { | |
288 len = sizeof(struct sockaddr_in); | 291 len = sizeof(struct sockaddr_in); |
289 if (getsockname(c->fd, (struct sockaddr *) &addr_in, &len) == -1) { | 292 if (getsockname(c->fd, (struct sockaddr *) &sin, &len) == -1) { |
290 ngx_connection_error(c, ngx_socket_errno, | 293 ngx_connection_error(c, ngx_socket_errno, |
291 "getsockname() failed"); | 294 "getsockname() failed"); |
292 ngx_http_close_connection(c); | 295 ngx_http_close_connection(c); |
293 return; | 296 return; |
294 } | 297 } |
295 | 298 |
296 r->in_addr = addr_in.sin_addr.s_addr; | 299 r->in_addr = sin.sin_addr.s_addr; |
297 | 300 } |
298 #if (NGX_WIN32) | |
299 } | |
300 #endif | |
301 | 301 |
302 /* the last in_port->addrs address is "*" */ | 302 /* the last in_port->addrs address is "*" */ |
303 | 303 |
304 for ( /* void */ ; i < in_port->addrs.nelts - 1; i++) { | 304 for ( /* void */ ; i < in_port->addrs.nelts - 1; i++) { |
305 if (in_addr[i].addr == r->in_addr) { | 305 if (in_addr[i].addr == r->in_addr) { |
568 | 568 |
569 | 569 |
570 if (r->method == 0) { | 570 if (r->method == 0) { |
571 r->method_name.len = r->method_end - r->request_start + 1; | 571 r->method_name.len = r->method_end - r->request_start + 1; |
572 r->method_name.data = r->request_line.data; | 572 r->method_name.data = r->request_line.data; |
573 } | |
574 | |
575 | |
576 if (r->http_protocol.data) { | |
577 r->http_protocol.len = r->request_end - r->http_protocol.data; | |
573 } | 578 } |
574 | 579 |
575 | 580 |
576 if (r->uri_ext) { | 581 if (r->uri_ext) { |
577 if (r->args_start) { | 582 if (r->args_start) { |
2171 #endif | 2176 #endif |
2172 | 2177 |
2173 | 2178 |
2174 void ngx_http_close_connection(ngx_connection_t *c) | 2179 void ngx_http_close_connection(ngx_connection_t *c) |
2175 { | 2180 { |
2181 ngx_pool_t *pool; | |
2182 | |
2176 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, | 2183 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, |
2177 "close http connection: %d", c->fd); | 2184 "close http connection: %d", c->fd); |
2178 | 2185 |
2179 #if (NGX_OPENSSL) | 2186 #if (NGX_OPENSSL) |
2180 | 2187 |
2190 | 2197 |
2191 #if (NGX_STAT_STUB) | 2198 #if (NGX_STAT_STUB) |
2192 (*ngx_stat_active)--; | 2199 (*ngx_stat_active)--; |
2193 #endif | 2200 #endif |
2194 | 2201 |
2202 pool = c->pool; | |
2203 | |
2195 ngx_close_connection(c); | 2204 ngx_close_connection(c); |
2205 | |
2206 ngx_destroy_pool(c->pool); | |
2196 } | 2207 } |
2197 | 2208 |
2198 | 2209 |
2199 static void ngx_http_client_error(ngx_http_request_t *r, | 2210 static void ngx_http_client_error(ngx_http_request_t *r, |
2200 int client_error, int error) | 2211 int client_error, int error) |