2002-08-16 01:20:26 +08:00
|
|
|
|
2004-09-28 16:34:51 +08:00
|
|
|
/*
|
2004-09-30 00:00:49 +08:00
|
|
|
* Copyright (C) Igor Sysoev
|
2004-09-28 16:34:51 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2002-08-16 01:20:26 +08:00
|
|
|
#include <ngx_config.h>
|
2002-08-30 00:59:54 +08:00
|
|
|
#include <ngx_core.h>
|
2002-08-16 01:20:26 +08:00
|
|
|
#include <ngx_http.h>
|
|
|
|
|
2004-09-07 23:29:22 +08: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 22:58:06 +08:00
|
|
|
ngx_int_t
|
|
|
|
ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
2002-08-16 01:20:26 +08:00
|
|
|
{
|
2005-04-08 23:18:55 +08:00
|
|
|
u_char c, ch, *p, *m;
|
2002-08-16 01:20:26 +08:00
|
|
|
enum {
|
2002-08-30 00:59:54 +08:00
|
|
|
sw_start = 0,
|
2004-04-14 13:57:36 +08:00
|
|
|
sw_method,
|
2002-08-30 00:59:54 +08:00
|
|
|
sw_space_after_method,
|
|
|
|
sw_spaces_before_uri,
|
2004-04-14 13:57:36 +08:00
|
|
|
sw_schema,
|
|
|
|
sw_schema_slash,
|
|
|
|
sw_schema_slash_slash,
|
|
|
|
sw_host,
|
|
|
|
sw_port,
|
2002-08-30 00:59:54 +08:00
|
|
|
sw_after_slash_in_uri,
|
|
|
|
sw_check_uri,
|
|
|
|
sw_uri,
|
|
|
|
sw_http_09,
|
2003-05-20 00:39:14 +08:00
|
|
|
sw_http_H,
|
|
|
|
sw_http_HT,
|
|
|
|
sw_http_HTT,
|
|
|
|
sw_http_HTTP,
|
2002-08-30 00:59:54 +08:00
|
|
|
sw_first_major_digit,
|
|
|
|
sw_major_digit,
|
|
|
|
sw_first_minor_digit,
|
|
|
|
sw_minor_digit,
|
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 21:03:58 +08:00
|
|
|
sw_almost_done
|
2002-12-05 00:29:40 +08:00
|
|
|
} state;
|
|
|
|
|
|
|
|
state = r->state;
|
2002-08-16 01:20:26 +08: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 21:03:58 +08:00
|
|
|
for (p = b->pos; p < b->last; p++) {
|
|
|
|
ch = *p;
|
2002-08-16 01:20:26 +08:00
|
|
|
|
2004-09-28 16:34:51 +08:00
|
|
|
/* gcc 2.95.2 and msvc 6.0 compile this switch as an jump table */
|
2002-08-16 01:20:26 +08:00
|
|
|
|
|
|
|
switch (state) {
|
|
|
|
|
|
|
|
/* HTTP methods: GET, HEAD, POST */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_start:
|
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 21:03:58 +08:00
|
|
|
r->request_start = p;
|
2003-03-05 14:37:42 +08:00
|
|
|
|
2004-04-22 02:54:33 +08:00
|
|
|
if (ch == CR || ch == LF) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2004-04-14 13:57:36 +08:00
|
|
|
if (ch < 'A' || ch > 'Z') {
|
2003-05-20 00:39:14 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_METHOD;
|
|
|
|
}
|
2002-08-16 01:20:26 +08:00
|
|
|
|
2004-04-14 13:57:36 +08:00
|
|
|
state = sw_method;
|
2003-05-20 00:39:14 +08:00
|
|
|
break;
|
2002-08-16 01:20:26 +08:00
|
|
|
|
2004-04-14 13:57:36 +08:00
|
|
|
case sw_method:
|
|
|
|
if (ch == ' ') {
|
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 22:58:06 +08:00
|
|
|
r->method_end = p - 1;
|
2004-04-14 13:57:36 +08:00
|
|
|
m = r->request_start;
|
|
|
|
|
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 21:03:58 +08:00
|
|
|
if (p - m == 3) {
|
2004-04-14 13:57:36 +08:00
|
|
|
|
2004-09-09 23:40:48 +08:00
|
|
|
if (m[0] == 'G' && m[1] == 'E' && m[2] == 'T') {
|
2004-04-14 13:57:36 +08:00
|
|
|
r->method = NGX_HTTP_GET;
|
|
|
|
}
|
|
|
|
|
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 21:03:58 +08:00
|
|
|
} else if (p - m == 4) {
|
2004-04-14 13:57:36 +08:00
|
|
|
|
2004-09-09 23:40:48 +08:00
|
|
|
if (m[0] == 'P' && m[1] == 'O'
|
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 21:03:58 +08:00
|
|
|
&& m[2] == 'S' && m[3] == 'T')
|
2004-04-14 13:57:36 +08:00
|
|
|
{
|
|
|
|
r->method = NGX_HTTP_POST;
|
|
|
|
|
2004-09-09 23:40:48 +08:00
|
|
|
} else if (m[0] == 'H' && m[1] == 'E'
|
|
|
|
&& m[2] == 'A' && m[3] == 'D')
|
2004-04-14 13:57:36 +08:00
|
|
|
{
|
|
|
|
r->method = NGX_HTTP_HEAD;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
state = sw_spaces_before_uri;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
2003-05-20 00:39:14 +08:00
|
|
|
}
|
2002-08-16 01:20:26 +08:00
|
|
|
|
2004-04-14 13:57:36 +08:00
|
|
|
if (ch < 'A' || ch > 'Z') {
|
2003-05-20 00:39:14 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_METHOD;
|
|
|
|
}
|
2004-04-14 13:57:36 +08:00
|
|
|
|
2003-05-20 00:39:14 +08:00
|
|
|
break;
|
2002-08-16 01:20:26 +08:00
|
|
|
|
2004-04-14 13:57:36 +08:00
|
|
|
/* single space after method */
|
|
|
|
case sw_space_after_method:
|
2003-05-20 00:39:14 +08:00
|
|
|
switch (ch) {
|
2004-04-14 13:57:36 +08:00
|
|
|
case ' ':
|
|
|
|
state = sw_spaces_before_uri;
|
2003-05-20 00:39:14 +08:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return NGX_HTTP_PARSE_INVALID_METHOD;
|
|
|
|
}
|
|
|
|
break;
|
2002-08-16 01:20:26 +08:00
|
|
|
|
2004-04-14 13:57:36 +08:00
|
|
|
/* space* before URI */
|
|
|
|
case sw_spaces_before_uri:
|
2005-04-08 23:18:55 +08:00
|
|
|
|
|
|
|
c = (u_char) (ch | 0x20);
|
|
|
|
if (c >= 'a' && c <= 'f') {
|
2005-02-16 21:40:36 +08:00
|
|
|
r->schema_start = p;
|
|
|
|
state = sw_schema;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2003-05-20 00:39:14 +08:00
|
|
|
switch (ch) {
|
2004-04-14 13:57:36 +08:00
|
|
|
case '/':
|
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 21:03:58 +08:00
|
|
|
r->uri_start = p;
|
2004-04-14 13:57:36 +08:00
|
|
|
state = sw_after_slash_in_uri;
|
|
|
|
break;
|
|
|
|
case ' ':
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
2003-05-20 00:39:14 +08:00
|
|
|
default:
|
2004-04-14 13:57:36 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
2003-05-20 00:39:14 +08:00
|
|
|
}
|
|
|
|
break;
|
2002-08-16 01:20:26 +08:00
|
|
|
|
2004-04-14 13:57:36 +08:00
|
|
|
case sw_schema:
|
2005-04-08 23:18:55 +08:00
|
|
|
|
|
|
|
c = (u_char) (ch | 0x20);
|
|
|
|
if (c >= 'a' && c <= 'f') {
|
2005-02-16 21:40:36 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2003-05-20 00:39:14 +08:00
|
|
|
switch (ch) {
|
2004-04-14 13:57:36 +08:00
|
|
|
case ':':
|
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 21:03:58 +08:00
|
|
|
r->schema_end = p;
|
2004-04-14 13:57:36 +08:00
|
|
|
state = sw_schema_slash;
|
2003-05-20 00:39:14 +08:00
|
|
|
break;
|
|
|
|
default:
|
2004-04-14 13:57:36 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
2003-05-20 00:39:14 +08:00
|
|
|
}
|
|
|
|
break;
|
2002-08-16 01:20:26 +08:00
|
|
|
|
2004-04-14 13:57:36 +08:00
|
|
|
case sw_schema_slash:
|
2003-05-20 00:39:14 +08:00
|
|
|
switch (ch) {
|
2004-04-14 13:57:36 +08:00
|
|
|
case '/':
|
|
|
|
state = sw_schema_slash_slash;
|
2003-05-20 00:39:14 +08:00
|
|
|
break;
|
|
|
|
default:
|
2004-04-14 13:57:36 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
2003-05-20 00:39:14 +08:00
|
|
|
}
|
|
|
|
break;
|
2002-08-16 01:20:26 +08:00
|
|
|
|
2004-04-14 13:57:36 +08:00
|
|
|
case sw_schema_slash_slash:
|
2003-05-20 00:39:14 +08:00
|
|
|
switch (ch) {
|
2004-04-14 13:57:36 +08:00
|
|
|
case '/':
|
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 21:03:58 +08:00
|
|
|
r->host_start = p;
|
2004-04-14 13:57:36 +08:00
|
|
|
state = sw_host;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
default:
|
2004-04-14 13:57:36 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
2002-08-16 01:20:26 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2004-04-14 13:57:36 +08:00
|
|
|
case sw_host:
|
2005-04-08 23:18:55 +08:00
|
|
|
|
|
|
|
c = (u_char) (ch | 0x20);
|
|
|
|
if (c >= 'a' && c <= 'f') {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((ch >= '0' && ch <= '9') || ch == '.' || ch == '-')
|
2005-02-16 21:40:36 +08:00
|
|
|
{
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2002-08-16 01:20:26 +08:00
|
|
|
switch (ch) {
|
2004-04-14 13:57:36 +08:00
|
|
|
case ':':
|
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 21:03:58 +08:00
|
|
|
r->host_end = p;
|
2004-04-14 13:57:36 +08:00
|
|
|
state = sw_port;
|
|
|
|
break;
|
|
|
|
case '/':
|
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 21:03:58 +08:00
|
|
|
r->host_end = p;
|
|
|
|
r->uri_start = p;
|
2004-04-14 13:57:36 +08:00
|
|
|
state = sw_after_slash_in_uri;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
default:
|
2004-04-14 13:57:36 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
2002-08-16 01:20:26 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2004-04-14 13:57:36 +08:00
|
|
|
case sw_port:
|
2005-02-16 21:40:36 +08:00
|
|
|
if (ch >= '0' && ch <= '9') {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2002-08-16 01:20:26 +08:00
|
|
|
switch (ch) {
|
|
|
|
case '/':
|
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 21:03:58 +08:00
|
|
|
r->port_end = p;
|
|
|
|
r->uri_start = p;
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_after_slash_in_uri;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
default:
|
2005-02-16 21:40:36 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
2002-08-16 01:20:26 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2004-11-11 22:07:14 +08:00
|
|
|
/* check "/.", "//", "%", and "\" (Win32) in URI */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_after_slash_in_uri:
|
2005-02-16 21:40:36 +08:00
|
|
|
|
2005-04-08 23:18:55 +08:00
|
|
|
c = (u_char) (ch | 0x20);
|
|
|
|
if (c >= 'a' && c <= 'f') {
|
|
|
|
state = sw_check_uri;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ch >= '0' && ch <= '9') {
|
2005-02-16 21:40:36 +08:00
|
|
|
state = sw_check_uri;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2002-08-16 01:20:26 +08:00
|
|
|
switch (ch) {
|
2005-02-16 21:40:36 +08:00
|
|
|
case ' ':
|
|
|
|
r->uri_end = p;
|
|
|
|
state = sw_http_09;
|
|
|
|
break;
|
2002-08-16 01:20:26 +08:00
|
|
|
case CR:
|
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 21:03:58 +08:00
|
|
|
r->uri_end = p;
|
2002-08-16 01:20:26 +08:00
|
|
|
r->http_minor = 9;
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_almost_done;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
case LF:
|
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 21:03:58 +08:00
|
|
|
r->uri_end = p;
|
2002-08-16 01:20:26 +08:00
|
|
|
r->http_minor = 9;
|
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 21:03:58 +08:00
|
|
|
goto done;
|
2002-08-16 01:20:26 +08:00
|
|
|
case '.':
|
|
|
|
r->complex_uri = 1;
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_uri;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
2004-10-11 23:07:03 +08:00
|
|
|
case '%':
|
|
|
|
r->quoted_uri = 1;
|
|
|
|
state = sw_uri;
|
|
|
|
break;
|
2005-02-16 21:40:36 +08:00
|
|
|
case '/':
|
|
|
|
r->complex_uri = 1;
|
|
|
|
state = sw_uri;
|
|
|
|
break;
|
2004-11-11 22:07:14 +08:00
|
|
|
#if (NGX_WIN32)
|
|
|
|
case '\\':
|
|
|
|
r->complex_uri = 1;
|
2005-02-16 21:40:36 +08:00
|
|
|
state = sw_uri;
|
2004-11-11 22:07:14 +08:00
|
|
|
break;
|
|
|
|
#endif
|
2005-02-16 21:40:36 +08:00
|
|
|
case '?':
|
|
|
|
r->args_start = p + 1;
|
|
|
|
state = sw_uri;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
2005-02-04 03:33:37 +08:00
|
|
|
case '+':
|
|
|
|
r->plus_in_uri = 1;
|
|
|
|
break;
|
2005-02-16 21:40:36 +08:00
|
|
|
case '\0':
|
|
|
|
r->zero_in_uri = 1;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
default:
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_check_uri;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2004-11-11 22:07:14 +08:00
|
|
|
/* check "/", "%" and "\" (Win32) in URI */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_check_uri:
|
2005-02-16 21:40:36 +08:00
|
|
|
|
2005-04-08 23:18:55 +08:00
|
|
|
c = (u_char) (ch | 0x20);
|
|
|
|
if (c >= 'a' && c <= 'f') {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ch >= '0' && ch <= '9') {
|
2005-02-16 21:40:36 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2002-08-16 01:20:26 +08:00
|
|
|
switch (ch) {
|
2005-02-16 21:40:36 +08:00
|
|
|
case '/':
|
|
|
|
r->uri_ext = NULL;
|
|
|
|
state = sw_after_slash_in_uri;
|
|
|
|
break;
|
|
|
|
case '.':
|
|
|
|
r->uri_ext = p + 1;
|
|
|
|
break;
|
|
|
|
case ' ':
|
|
|
|
r->uri_end = p;
|
|
|
|
state = sw_http_09;
|
|
|
|
break;
|
2002-08-16 01:20:26 +08:00
|
|
|
case CR:
|
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 21:03:58 +08:00
|
|
|
r->uri_end = p;
|
2002-08-16 01:20:26 +08:00
|
|
|
r->http_minor = 9;
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_almost_done;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
case LF:
|
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 21:03:58 +08:00
|
|
|
r->uri_end = p;
|
2002-08-16 01:20:26 +08:00
|
|
|
r->http_minor = 9;
|
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 21:03:58 +08:00
|
|
|
goto done;
|
2004-11-11 22:07:14 +08:00
|
|
|
#if (NGX_WIN32)
|
|
|
|
case '\\':
|
|
|
|
r->complex_uri = 1;
|
|
|
|
state = sw_after_slash_in_uri;
|
|
|
|
break;
|
|
|
|
#endif
|
2003-06-02 23:24:30 +08:00
|
|
|
case '%':
|
2004-10-11 23:07:03 +08:00
|
|
|
r->quoted_uri = 1;
|
2003-06-02 23:24:30 +08:00
|
|
|
state = sw_uri;
|
|
|
|
break;
|
2005-02-16 21:40:36 +08:00
|
|
|
case '+':
|
|
|
|
r->plus_in_uri = 1;
|
|
|
|
break;
|
2002-08-16 01:20:26 +08:00
|
|
|
case '?':
|
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 21:03:58 +08:00
|
|
|
r->args_start = p + 1;
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_uri;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
2005-02-16 21:40:36 +08:00
|
|
|
case '\0':
|
|
|
|
r->zero_in_uri = 1;
|
|
|
|
break;
|
2002-08-16 01:20:26 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* URI */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_uri:
|
2002-08-16 01:20:26 +08:00
|
|
|
switch (ch) {
|
2005-02-16 21:40:36 +08:00
|
|
|
case ' ':
|
|
|
|
r->uri_end = p;
|
|
|
|
state = sw_http_09;
|
|
|
|
break;
|
2002-08-16 01:20:26 +08:00
|
|
|
case CR:
|
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 21:03:58 +08:00
|
|
|
r->uri_end = p;
|
2002-08-16 01:20:26 +08:00
|
|
|
r->http_minor = 9;
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_almost_done;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
case LF:
|
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 21:03:58 +08:00
|
|
|
r->uri_end = p;
|
2002-08-16 01:20:26 +08:00
|
|
|
r->http_minor = 9;
|
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 21:03:58 +08:00
|
|
|
goto done;
|
2005-02-04 03:33:37 +08:00
|
|
|
case '+':
|
|
|
|
r->plus_in_uri = 1;
|
|
|
|
break;
|
2005-02-16 21:40:36 +08:00
|
|
|
case '\0':
|
|
|
|
r->zero_in_uri = 1;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* space+ after URI */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_http_09:
|
2002-08-16 01:20:26 +08:00
|
|
|
switch (ch) {
|
|
|
|
case ' ':
|
|
|
|
break;
|
|
|
|
case CR:
|
|
|
|
r->http_minor = 9;
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_almost_done;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
case LF:
|
|
|
|
r->http_minor = 9;
|
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 21:03:58 +08:00
|
|
|
goto done;
|
2002-08-16 01:20:26 +08:00
|
|
|
case 'H':
|
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 21:03:58 +08:00
|
|
|
r->http_protocol.data = p;
|
2003-05-20 00:39:14 +08:00
|
|
|
state = sw_http_H;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case sw_http_H:
|
|
|
|
switch (ch) {
|
|
|
|
case 'T':
|
|
|
|
state = sw_http_HT;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
default:
|
2002-09-13 22:47:42 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
2002-08-16 01:20:26 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2003-05-20 00:39:14 +08:00
|
|
|
case sw_http_HT:
|
|
|
|
switch (ch) {
|
|
|
|
case 'T':
|
|
|
|
state = sw_http_HTT;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
2002-08-16 01:20:26 +08:00
|
|
|
}
|
2003-05-20 00:39:14 +08:00
|
|
|
break;
|
2002-08-16 01:20:26 +08:00
|
|
|
|
2003-05-20 00:39:14 +08:00
|
|
|
case sw_http_HTT:
|
|
|
|
switch (ch) {
|
|
|
|
case 'P':
|
|
|
|
state = sw_http_HTTP;
|
|
|
|
break;
|
|
|
|
default:
|
2002-09-13 22:47:42 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
2003-01-09 13:36:00 +08:00
|
|
|
}
|
2003-05-20 00:39:14 +08:00
|
|
|
break;
|
2002-08-16 01:20:26 +08:00
|
|
|
|
2003-05-20 00:39:14 +08:00
|
|
|
case sw_http_HTTP:
|
|
|
|
switch (ch) {
|
|
|
|
case '/':
|
|
|
|
state = sw_first_major_digit;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
|
|
|
}
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
/* first digit of major HTTP version */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_first_major_digit:
|
2003-01-09 13:36:00 +08:00
|
|
|
if (ch < '1' || ch > '9') {
|
2002-09-13 22:47:42 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
2003-01-09 13:36:00 +08:00
|
|
|
}
|
2002-08-16 01:20:26 +08:00
|
|
|
|
|
|
|
r->http_major = ch - '0';
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_major_digit;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
/* major HTTP version or dot */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_major_digit:
|
2002-08-16 01:20:26 +08:00
|
|
|
if (ch == '.') {
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_first_minor_digit;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2003-01-09 13:36:00 +08:00
|
|
|
if (ch < '0' || ch > '9') {
|
2002-09-13 22:47:42 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
2003-01-09 13:36:00 +08:00
|
|
|
}
|
2002-08-16 01:20:26 +08:00
|
|
|
|
|
|
|
r->http_major = r->http_major * 10 + ch - '0';
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* first digit of minor HTTP version */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_first_minor_digit:
|
2003-01-09 13:36:00 +08:00
|
|
|
if (ch < '0' || ch > '9') {
|
2002-09-13 22:47:42 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
2003-01-09 13:36:00 +08:00
|
|
|
}
|
2002-08-16 01:20:26 +08:00
|
|
|
|
|
|
|
r->http_minor = ch - '0';
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_minor_digit;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
|
|
|
|
/* minor HTTP version or end of request line */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_minor_digit:
|
2002-08-16 01:20:26 +08:00
|
|
|
if (ch == CR) {
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_almost_done;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ch == LF) {
|
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 21:03:58 +08:00
|
|
|
goto done;
|
2002-08-16 01:20:26 +08:00
|
|
|
}
|
|
|
|
|
2003-01-09 13:36:00 +08:00
|
|
|
if (ch < '0' || ch > '9') {
|
2002-09-13 22:47:42 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
2003-01-09 13:36:00 +08:00
|
|
|
}
|
2002-08-16 01:20:26 +08:00
|
|
|
|
|
|
|
r->http_minor = r->http_minor * 10 + ch - '0';
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* end of request line */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_almost_done:
|
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 21:03:58 +08:00
|
|
|
r->request_end = p - 1;
|
2002-08-16 01:20:26 +08:00
|
|
|
switch (ch) {
|
|
|
|
case LF:
|
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 21:03:58 +08:00
|
|
|
goto done;
|
2002-08-16 01:20:26 +08:00
|
|
|
default:
|
2002-09-13 22:47:42 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
2002-08-16 01:20:26 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-09-21 13:38:28 +08:00
|
|
|
b->pos = p;
|
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 21:03:58 +08:00
|
|
|
r->state = state;
|
2002-08-16 01:20:26 +08: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 21:03:58 +08:00
|
|
|
return NGX_AGAIN;
|
2003-01-09 13:36:00 +08: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 21:03:58 +08:00
|
|
|
done:
|
2003-01-09 13:36:00 +08: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 21:03:58 +08:00
|
|
|
b->pos = p + 1;
|
|
|
|
|
|
|
|
if (r->request_end == NULL) {
|
|
|
|
r->request_end = p;
|
|
|
|
}
|
2003-01-09 13:36:00 +08: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 21:03:58 +08:00
|
|
|
r->http_version = r->http_major * 1000 + r->http_minor;
|
|
|
|
r->state = sw_start;
|
2003-05-15 23:42:53 +08: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 21:03:58 +08:00
|
|
|
if (r->http_version == 9 && r->method != NGX_HTTP_GET) {
|
|
|
|
return NGX_HTTP_PARSE_INVALID_09_METHOD;
|
2002-08-16 01:20:26 +08: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 21:03:58 +08:00
|
|
|
|
|
|
|
return NGX_OK;
|
2002-08-16 01:20:26 +08:00
|
|
|
}
|
|
|
|
|
2003-11-29 01:41:47 +08: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 22:58:06 +08:00
|
|
|
ngx_int_t
|
|
|
|
ngx_http_parse_header_line(ngx_http_request_t *r, ngx_buf_t *b)
|
2002-08-16 01:20:26 +08:00
|
|
|
{
|
2005-04-08 23:18:55 +08:00
|
|
|
u_char c, ch, *p;
|
|
|
|
ngx_uint_t hash;
|
2003-11-29 01:41:47 +08:00
|
|
|
enum {
|
2002-08-30 00:59:54 +08:00
|
|
|
sw_start = 0,
|
|
|
|
sw_name,
|
|
|
|
sw_space_before_value,
|
|
|
|
sw_value,
|
|
|
|
sw_space_after_value,
|
2005-03-23 00:02:46 +08:00
|
|
|
sw_ignore_line,
|
2002-08-30 00:59:54 +08:00
|
|
|
sw_almost_done,
|
2005-03-23 00:02:46 +08:00
|
|
|
sw_header_almost_done
|
2002-12-05 00:29:40 +08:00
|
|
|
} state;
|
|
|
|
|
|
|
|
state = r->state;
|
2005-04-08 23:18:55 +08:00
|
|
|
hash = r->header_hash;
|
2002-08-16 01:20:26 +08: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 21:03:58 +08:00
|
|
|
for (p = b->pos; p < b->last; p++) {
|
|
|
|
ch = *p;
|
2002-08-16 01:20:26 +08:00
|
|
|
|
|
|
|
switch (state) {
|
|
|
|
|
|
|
|
/* first char */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_start:
|
2002-08-16 01:20:26 +08:00
|
|
|
switch (ch) {
|
|
|
|
case CR:
|
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 21:03:58 +08:00
|
|
|
r->header_end = p;
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_header_almost_done;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
case LF:
|
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 21:03:58 +08:00
|
|
|
r->header_end = p;
|
|
|
|
goto header_done;
|
2002-08-16 01:20:26 +08:00
|
|
|
default:
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_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 21:03:58 +08:00
|
|
|
r->header_name_start = p;
|
2002-08-16 01:20:26 +08:00
|
|
|
|
2004-03-16 21:35:20 +08:00
|
|
|
c = (u_char) (ch | 0x20);
|
2003-01-09 13:36:00 +08:00
|
|
|
if (c >= 'a' && c <= 'z') {
|
2005-04-08 23:18:55 +08:00
|
|
|
hash = c;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
2003-01-09 13:36:00 +08:00
|
|
|
}
|
2002-08-16 01:20:26 +08:00
|
|
|
|
2003-01-09 13:36:00 +08:00
|
|
|
if (ch >= '0' && ch <= '9') {
|
2005-04-08 23:18:55 +08:00
|
|
|
hash = ch;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
2003-01-09 13:36:00 +08:00
|
|
|
}
|
2002-08-16 01:20:26 +08:00
|
|
|
|
2005-03-23 00:02:46 +08:00
|
|
|
break;
|
2002-08-16 01:20:26 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* header name */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_name:
|
2004-03-16 15:10:12 +08:00
|
|
|
c = (u_char) (ch | 0x20);
|
2003-01-09 13:36:00 +08:00
|
|
|
if (c >= 'a' && c <= 'z') {
|
2005-04-08 23:18:55 +08:00
|
|
|
hash += c;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
2003-01-09 13:36:00 +08:00
|
|
|
}
|
2002-08-16 01:20:26 +08:00
|
|
|
|
|
|
|
if (ch == ':') {
|
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 21:03:58 +08:00
|
|
|
r->header_name_end = p;
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_space_before_value;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2005-03-23 00:02:46 +08:00
|
|
|
if (ch == '-') {
|
2005-04-08 23:18:55 +08:00
|
|
|
hash += ch;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
2003-01-09 13:36:00 +08:00
|
|
|
}
|
2002-08-16 01:20:26 +08:00
|
|
|
|
2003-01-09 13:36:00 +08:00
|
|
|
if (ch >= '0' && ch <= '9') {
|
2005-04-08 23:18:55 +08:00
|
|
|
hash += ch;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
2003-01-09 13:36:00 +08:00
|
|
|
}
|
2002-08-16 01:20:26 +08: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 22:58:06 +08:00
|
|
|
if (ch == CR) {
|
|
|
|
r->header_name_end = p;
|
|
|
|
r->header_start = p;
|
|
|
|
r->header_end = p;
|
|
|
|
state = sw_almost_done;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ch == LF) {
|
|
|
|
r->header_name_end = p;
|
|
|
|
r->header_start = p;
|
|
|
|
r->header_end = p;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
2004-10-11 23:07:03 +08:00
|
|
|
/* IIS may send the duplicate "HTTP/1.1 ..." lines */
|
2003-04-09 23:42:08 +08:00
|
|
|
if (ch == '/'
|
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 22:58:06 +08:00
|
|
|
&& r->upstream
|
|
|
|
&& p - r->header_name_start == 4
|
|
|
|
&& ngx_strncmp(r->header_name_start, "HTTP", 4) == 0)
|
2003-04-09 23:42:08 +08:00
|
|
|
{
|
|
|
|
state = sw_ignore_line;
|
|
|
|
break;
|
2003-04-08 23:40:10 +08:00
|
|
|
}
|
|
|
|
|
2005-03-23 00:02:46 +08:00
|
|
|
break;
|
2002-08-16 01:20:26 +08:00
|
|
|
|
|
|
|
/* space* before header value */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_space_before_value:
|
2002-08-16 01:20:26 +08:00
|
|
|
switch (ch) {
|
|
|
|
case ' ':
|
|
|
|
break;
|
|
|
|
case CR:
|
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 22:58:06 +08:00
|
|
|
r->header_start = p;
|
|
|
|
r->header_end = p;
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_almost_done;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
case LF:
|
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 22:58:06 +08:00
|
|
|
r->header_start = p;
|
|
|
|
r->header_end = p;
|
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 21:03:58 +08:00
|
|
|
goto done;
|
2002-08-16 01:20:26 +08:00
|
|
|
default:
|
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 21:03:58 +08:00
|
|
|
r->header_start = p;
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_value;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* header value */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_value:
|
2002-08-16 01:20:26 +08:00
|
|
|
switch (ch) {
|
|
|
|
case ' ':
|
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 21:03:58 +08:00
|
|
|
r->header_end = p;
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_space_after_value;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
case CR:
|
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 21:03:58 +08:00
|
|
|
r->header_end = p;
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_almost_done;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
case LF:
|
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 21:03:58 +08:00
|
|
|
r->header_end = p;
|
|
|
|
goto done;
|
2002-08-16 01:20:26 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* space* before end of header line */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_space_after_value:
|
2002-08-16 01:20:26 +08:00
|
|
|
switch (ch) {
|
|
|
|
case ' ':
|
|
|
|
break;
|
|
|
|
case CR:
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_almost_done;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
case LF:
|
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 21:03:58 +08:00
|
|
|
goto done;
|
2002-08-16 01:20:26 +08:00
|
|
|
default:
|
2002-08-30 00:59:54 +08:00
|
|
|
state = sw_value;
|
2002-08-16 01:20:26 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2003-04-08 23:40:10 +08:00
|
|
|
/* ignore header line */
|
|
|
|
case sw_ignore_line:
|
|
|
|
switch (ch) {
|
|
|
|
case LF:
|
|
|
|
state = sw_start;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
2005-03-23 00:02:46 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2002-08-16 01:20:26 +08:00
|
|
|
/* end of header line */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_almost_done:
|
2002-08-16 01:20:26 +08:00
|
|
|
switch (ch) {
|
|
|
|
case LF:
|
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 21:03:58 +08:00
|
|
|
goto done;
|
2002-08-16 01:20:26 +08:00
|
|
|
default:
|
2002-09-13 22:47:42 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_HEADER;
|
2002-08-16 01:20:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/* end of header */
|
2002-08-30 00:59:54 +08:00
|
|
|
case sw_header_almost_done:
|
2002-08-16 01:20:26 +08:00
|
|
|
switch (ch) {
|
|
|
|
case LF:
|
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 21:03:58 +08:00
|
|
|
goto header_done;
|
2002-08-16 01:20:26 +08:00
|
|
|
default:
|
2002-09-13 22:47:42 +08:00
|
|
|
return NGX_HTTP_PARSE_INVALID_HEADER;
|
2002-08-16 01:20:26 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-05-28 23:49:23 +08:00
|
|
|
b->pos = p;
|
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 21:03:58 +08:00
|
|
|
r->state = state;
|
2005-04-08 23:18:55 +08:00
|
|
|
r->header_hash = hash;
|
2002-08-16 01:20:26 +08: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 21:03:58 +08:00
|
|
|
return NGX_AGAIN;
|
2003-01-09 13:36:00 +08: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 21:03:58 +08:00
|
|
|
done:
|
2003-01-09 13:36:00 +08: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 21:03:58 +08:00
|
|
|
b->pos = p + 1;
|
|
|
|
r->state = sw_start;
|
2005-04-08 23:18:55 +08:00
|
|
|
r->header_hash = hash;
|
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 21:03:58 +08:00
|
|
|
|
|
|
|
return NGX_OK;
|
|
|
|
|
|
|
|
header_done:
|
|
|
|
|
|
|
|
b->pos = p + 1;
|
|
|
|
r->state = sw_start;
|
|
|
|
|
|
|
|
return NGX_HTTP_PARSE_HEADER_DONE;
|
2002-08-16 01:20:26 +08:00
|
|
|
}
|
2003-11-29 01:41:47 +08: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 22:58:06 +08:00
|
|
|
ngx_int_t
|
|
|
|
ngx_http_parse_complex_uri(ngx_http_request_t *r)
|
2003-11-29 01:41:47 +08:00
|
|
|
{
|
2004-03-16 15:10:12 +08:00
|
|
|
u_char c, ch, decoded, *p, *u;
|
2003-11-29 01:41:47 +08:00
|
|
|
enum {
|
|
|
|
sw_usual = 0,
|
|
|
|
sw_slash,
|
|
|
|
sw_dot,
|
|
|
|
sw_dot_dot,
|
2004-11-11 22:07:14 +08:00
|
|
|
#if (NGX_WIN32)
|
2003-11-29 01:41:47 +08:00
|
|
|
sw_dot_dot_dot,
|
|
|
|
#endif
|
|
|
|
sw_quoted,
|
|
|
|
sw_quoted_second
|
|
|
|
} state, quoted_state;
|
|
|
|
|
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 21:03:58 +08:00
|
|
|
#if (NGX_SUPPRESS_WARN)
|
2003-11-29 01:41:47 +08:00
|
|
|
decoded = '\0';
|
|
|
|
quoted_state = sw_usual;
|
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 21:03:58 +08:00
|
|
|
#endif
|
2003-11-29 01:41:47 +08:00
|
|
|
|
|
|
|
state = sw_usual;
|
|
|
|
p = r->uri_start;
|
|
|
|
u = r->uri.data;
|
2003-12-01 04:03:18 +08:00
|
|
|
r->uri_ext = NULL;
|
2004-11-11 22:07:14 +08:00
|
|
|
r->args_start = NULL;
|
2003-11-29 01:41:47 +08:00
|
|
|
|
|
|
|
ch = *p++;
|
|
|
|
|
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 21:03:58 +08:00
|
|
|
while (p <= r->uri_end) {
|
2004-11-11 22:07:14 +08: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 21:03:58 +08:00
|
|
|
* we use "ch = *p++" inside the cycle, but this operation is safe,
|
2004-11-11 22:07:14 +08:00
|
|
|
* because after the URI there is always at least one charcter:
|
|
|
|
* the line feed
|
|
|
|
*/
|
2003-11-29 01:41:47 +08:00
|
|
|
|
2004-02-12 01:08:49 +08:00
|
|
|
ngx_log_debug4(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
|
2004-11-11 22:07:14 +08:00
|
|
|
"s:%d in:'%Xd:%c', out:'%c'", state, ch, ch, *u);
|
2003-11-29 01:41:47 +08:00
|
|
|
|
|
|
|
switch (state) {
|
|
|
|
case sw_usual:
|
|
|
|
switch(ch) {
|
2004-11-11 22:07:14 +08:00
|
|
|
#if (NGX_WIN32)
|
|
|
|
case '\\':
|
|
|
|
r->uri_ext = NULL;
|
|
|
|
|
|
|
|
if (p == r->uri_start + r->uri.len) {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* we omit the last "\" to cause redirect because
|
|
|
|
* the browsers do not treat "\" as "/" in relative URL path
|
|
|
|
*/
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
state = sw_slash;
|
|
|
|
*u++ = '/';
|
|
|
|
break;
|
|
|
|
#endif
|
2003-11-29 01:41:47 +08:00
|
|
|
case '/':
|
2003-12-01 04:03:18 +08:00
|
|
|
r->uri_ext = NULL;
|
2003-11-29 01:41:47 +08:00
|
|
|
state = sw_slash;
|
|
|
|
*u++ = ch;
|
|
|
|
break;
|
|
|
|
case '%':
|
|
|
|
quoted_state = state;
|
|
|
|
state = sw_quoted;
|
|
|
|
break;
|
2004-11-11 22:07:14 +08:00
|
|
|
case '?':
|
|
|
|
r->args_start = p;
|
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 21:03:58 +08:00
|
|
|
goto done;
|
2003-12-01 04:03:18 +08:00
|
|
|
case '.':
|
|
|
|
r->uri_ext = u + 1;
|
2004-12-03 02:40:46 +08:00
|
|
|
*u++ = ch;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
*u++ = ch;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
ch = *p++;
|
|
|
|
break;
|
|
|
|
|
2003-11-29 01:41:47 +08:00
|
|
|
case sw_slash:
|
|
|
|
switch(ch) {
|
2004-11-11 22:07:14 +08:00
|
|
|
#if (NGX_WIN32)
|
|
|
|
case '\\':
|
|
|
|
break;
|
|
|
|
#endif
|
2003-11-29 01:41:47 +08:00
|
|
|
case '/':
|
|
|
|
break;
|
|
|
|
case '.':
|
|
|
|
state = sw_dot;
|
|
|
|
*u++ = ch;
|
|
|
|
break;
|
|
|
|
case '%':
|
|
|
|
quoted_state = state;
|
|
|
|
state = sw_quoted;
|
|
|
|
break;
|
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 21:03:58 +08:00
|
|
|
case '?':
|
|
|
|
r->args_start = p;
|
|
|
|
goto done;
|
2003-11-29 01:41:47 +08:00
|
|
|
default:
|
|
|
|
state = sw_usual;
|
|
|
|
*u++ = ch;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
ch = *p++;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case sw_dot:
|
|
|
|
switch(ch) {
|
2004-11-11 22:07:14 +08:00
|
|
|
#if (NGX_WIN32)
|
|
|
|
case '\\':
|
|
|
|
/* fall through */
|
|
|
|
#endif
|
2003-11-29 01:41:47 +08:00
|
|
|
case '/':
|
|
|
|
state = sw_slash;
|
|
|
|
u--;
|
|
|
|
break;
|
|
|
|
case '.':
|
|
|
|
state = sw_dot_dot;
|
|
|
|
*u++ = ch;
|
|
|
|
break;
|
|
|
|
case '%':
|
|
|
|
quoted_state = state;
|
|
|
|
state = sw_quoted;
|
|
|
|
break;
|
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 21:03:58 +08:00
|
|
|
case '?':
|
|
|
|
r->args_start = p;
|
|
|
|
goto done;
|
2003-11-29 01:41:47 +08:00
|
|
|
default:
|
|
|
|
state = sw_usual;
|
|
|
|
*u++ = ch;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
ch = *p++;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case sw_dot_dot:
|
|
|
|
switch(ch) {
|
2004-11-11 22:07:14 +08:00
|
|
|
#if (NGX_WIN32)
|
|
|
|
case '\\':
|
|
|
|
/* fall through */
|
|
|
|
#endif
|
2003-11-29 01:41:47 +08:00
|
|
|
case '/':
|
|
|
|
state = sw_slash;
|
|
|
|
u -= 4;
|
|
|
|
if (u < r->uri.data) {
|
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
|
|
|
}
|
|
|
|
while (*(u - 1) != '/') {
|
|
|
|
u--;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case '%':
|
|
|
|
quoted_state = state;
|
|
|
|
state = sw_quoted;
|
|
|
|
break;
|
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 21:03:58 +08:00
|
|
|
case '?':
|
|
|
|
r->args_start = p;
|
|
|
|
goto done;
|
2004-11-11 22:07:14 +08:00
|
|
|
#if (NGX_WIN32)
|
2003-11-29 01:41:47 +08:00
|
|
|
case '.':
|
|
|
|
state = sw_dot_dot_dot;
|
|
|
|
*u++ = ch;
|
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
default:
|
|
|
|
state = sw_usual;
|
|
|
|
*u++ = ch;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
ch = *p++;
|
|
|
|
break;
|
|
|
|
|
2004-11-11 22:07:14 +08:00
|
|
|
#if (NGX_WIN32)
|
2003-11-29 01:41:47 +08:00
|
|
|
case sw_dot_dot_dot:
|
|
|
|
switch(ch) {
|
2004-11-11 22:07:14 +08:00
|
|
|
case '\\':
|
2003-11-29 01:41:47 +08:00
|
|
|
case '/':
|
|
|
|
state = sw_slash;
|
|
|
|
u -= 5;
|
|
|
|
if (u < r->uri.data) {
|
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
|
|
|
}
|
|
|
|
while (*u != '/') {
|
|
|
|
u--;
|
|
|
|
}
|
|
|
|
if (u < r->uri.data) {
|
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
|
|
|
}
|
|
|
|
while (*(u - 1) != '/') {
|
|
|
|
u--;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case '%':
|
|
|
|
quoted_state = state;
|
|
|
|
state = sw_quoted;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
state = sw_usual;
|
|
|
|
*u++ = ch;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
ch = *p++;
|
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
case sw_quoted:
|
|
|
|
if (ch >= '0' && ch <= '9') {
|
2004-03-16 21:35:20 +08:00
|
|
|
decoded = (u_char) (ch - '0');
|
2003-11-29 01:41:47 +08:00
|
|
|
state = sw_quoted_second;
|
|
|
|
ch = *p++;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2004-03-16 21:35:20 +08:00
|
|
|
c = (u_char) (ch | 0x20);
|
2003-11-29 01:41:47 +08:00
|
|
|
if (c >= 'a' && c <= 'f') {
|
2004-03-16 21:35:20 +08:00
|
|
|
decoded = (u_char) (c - 'a' + 10);
|
2003-11-29 01:41:47 +08:00
|
|
|
state = sw_quoted_second;
|
|
|
|
ch = *p++;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
|
|
|
|
|
|
|
case sw_quoted_second:
|
|
|
|
if (ch >= '0' && ch <= '9') {
|
2004-03-16 21:35:20 +08:00
|
|
|
ch = (u_char) ((decoded << 4) + ch - '0');
|
2005-02-16 21:40:36 +08:00
|
|
|
|
2003-12-03 00:57:05 +08:00
|
|
|
if (ch == '%') {
|
|
|
|
state = sw_usual;
|
|
|
|
*u++ = ch;
|
|
|
|
ch = *p++;
|
|
|
|
break;
|
|
|
|
}
|
2005-02-16 21:40:36 +08:00
|
|
|
|
|
|
|
if (ch == '\0') {
|
|
|
|
r->zero_in_uri = 1;
|
|
|
|
*u++ = ch;
|
|
|
|
ch = *p++;
|
|
|
|
}
|
|
|
|
|
2003-11-29 01:41:47 +08:00
|
|
|
state = quoted_state;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2004-03-16 21:35:20 +08:00
|
|
|
c = (u_char) (ch | 0x20);
|
2003-11-29 01:41:47 +08:00
|
|
|
if (c >= 'a' && c <= 'f') {
|
2004-03-16 21:35:20 +08:00
|
|
|
ch = (u_char) ((decoded << 4) + c - 'a' + 10);
|
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 21:03:58 +08:00
|
|
|
if (ch == '?') {
|
2003-12-03 00:57:05 +08:00
|
|
|
*u++ = ch;
|
|
|
|
ch = *p++;
|
|
|
|
}
|
2003-11-29 01:41:47 +08:00
|
|
|
state = quoted_state;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return NGX_HTTP_PARSE_INVALID_REQUEST;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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 21:03:58 +08:00
|
|
|
done:
|
|
|
|
|
2003-11-29 01:41:47 +08:00
|
|
|
r->uri.len = u - r->uri.data;
|
|
|
|
r->uri.data[r->uri.len] = '\0';
|
|
|
|
|
2003-12-01 04:03:18 +08:00
|
|
|
if (r->uri_ext) {
|
|
|
|
r->exten.len = u - r->uri_ext;
|
2004-11-11 22:07:14 +08:00
|
|
|
r->exten.data = r->uri_ext;
|
2003-12-01 04:03:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
r->uri_ext = NULL;
|
|
|
|
|
2003-11-29 01:41:47 +08:00
|
|
|
return NGX_OK;
|
|
|
|
}
|
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 22:58:06 +08:00
|
|
|
|
|
|
|
|
|
|
|
ngx_int_t
|
|
|
|
ngx_http_parse_multi_header_lines(ngx_array_t *headers, ngx_str_t *name,
|
|
|
|
ngx_str_t *value)
|
|
|
|
{
|
|
|
|
ngx_uint_t i;
|
|
|
|
u_char *start, *last, *end, ch;
|
|
|
|
ngx_table_elt_t **h;
|
|
|
|
|
|
|
|
h = headers->elts;
|
|
|
|
|
|
|
|
for (i = 0; i < headers->nelts; i++) {
|
|
|
|
|
|
|
|
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, headers->pool->log, 0,
|
|
|
|
"parse header: \"%V: %V\"", &h[i]->key, &h[i]->value);
|
|
|
|
|
|
|
|
if (name->len > h[i]->value.len) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
start = h[i]->value.data;
|
|
|
|
end = h[i]->value.data + h[i]->value.len;
|
|
|
|
|
|
|
|
while (start < end) {
|
|
|
|
|
|
|
|
if (ngx_strncasecmp(start, name->data, name->len) != 0) {
|
|
|
|
goto skip;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (start += name->len; start < end && *start == ' '; start++) {
|
|
|
|
/* void */
|
|
|
|
}
|
|
|
|
|
|
|
|
if (value == NULL) {
|
|
|
|
if (start == end || *start == ',') {
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
|
|
|
|
goto skip;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (start == end || *start++ != '=') {
|
|
|
|
/* the invalid header value */
|
|
|
|
goto skip;
|
|
|
|
}
|
|
|
|
|
|
|
|
while (start < end && *start == ' ') { start++; }
|
|
|
|
|
|
|
|
for (last = start; last < end && *last != ';'; last++) {
|
|
|
|
/* void */
|
|
|
|
}
|
|
|
|
|
|
|
|
value->len = last - start;
|
|
|
|
value->data = start;
|
|
|
|
|
|
|
|
return i;
|
|
|
|
|
|
|
|
skip:
|
|
|
|
while (start < end) {
|
|
|
|
ch = *start++;
|
|
|
|
if (ch == ';' || ch == ',') {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
while (start < end && *start == ' ') { start++; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return NGX_DECLINED;
|
|
|
|
}
|