mirror of
https://github.com/nginx/nginx.git
synced 2025-01-03 12:47:21 -06:00
nginx-0.1.40-RELEASE import
*) Bugfix: if a client sent too long header line, then the request information did not logged in the error log. *) Bugfix: the "Set-Cookie" header line was not transferred when the "X-Accel-Redirect" was used; the bug had appeared in 0.1.39. *) Bugfix: the "Content-Disposition" header line was not transferred when the "X-Accel-Redirect" was used. *) Bugfix: the master process did not close the listen socket on the SIGQUIT signal. *) Bugfix: after on-line upgrade on Linux and Solaris the process name became shorter in the "ps" command.
This commit is contained in:
parent
9e7984ca78
commit
90c0814781
@ -9,6 +9,65 @@
|
||||
<title lang="en">nginx changelog</title>
|
||||
|
||||
|
||||
<changes ver="0.1.40" date="22.07.2005">
|
||||
|
||||
<change type="bugfix">
|
||||
<para lang="ru">
|
||||
ÅÓÌÉ ËÌÉÅÎÔ ÓÌÁÌ ÏÞÅÎØ ÄÌÉÎÎÕÀ ÓÔÒÏËÕ ÚÁÇÏÌÏ×ËÁ, ÔÏ × ÌÏÇÅ ÎÅ ÐÏÍÅÝÁÌÁÓØ
|
||||
ÉÎÆÏÒÍÁÃÉÑ, Ó×ÑÚÁÎÎÁÑ Ó ÜÔÉÍ ÚÁÐÒÏÓÏÍ.
|
||||
</para>
|
||||
<para lang="en">
|
||||
if a client sent too long header line, then the request information
|
||||
did not logged in the error log.
|
||||
</para>
|
||||
</change>
|
||||
|
||||
<change type="bugfix">
|
||||
<para lang="ru">
|
||||
ÐÒÉ ÉÓÐÏÌØÚÏ×ÁÎÉÉ "X-Accel-Redirect" ÎÅ ÐÅÒÅÄÁ×ÁÌÁÓØ ÓÔÒÏËÁ "Set-Cookie";
|
||||
ÏÛÉÂËÁ ÐÏÑ×ÉÌÁÓØ × 0.1.39.
|
||||
</para>
|
||||
<para lang="en">
|
||||
the "Set-Cookie" header line was not transferred when the "X-Accel-Redirect"
|
||||
was used;
|
||||
bug appeared in 0.1.39.
|
||||
</para>
|
||||
</change>
|
||||
|
||||
<change type="bugfix">
|
||||
<para lang="ru">
|
||||
ÐÒÉ ÉÓÐÏÌØÚÏ×ÁÎÉÉ "X-Accel-Redirect" ÎÅ ÐÅÒÅÄÁ×ÁÌÁÓØ ÓÔÒÏËÁ
|
||||
"Content-Disposition".
|
||||
</para>
|
||||
<para lang="en">
|
||||
the "Content-Disposition" header line was not transferred when
|
||||
the "X-Accel-Redirect" was used.
|
||||
</para>
|
||||
</change>
|
||||
|
||||
<change type="bugfix">
|
||||
<para lang="ru">
|
||||
ÐÏ ÓÉÇÎÁÌÕ SIGQUIT ÏÓÎÏ×ÎÏÊ ÐÒÏÃÅÓÓ ÎÅ ÚÁËÒÙ×ÁÌ ÓÏËÅÔÙ, ÎÁ ËÏÔÏÒÙÈ ÏÎ ÓÌÕÛÁÌ.
|
||||
</para>
|
||||
<para lang="en">
|
||||
the master process did not close the listen socket on the SIGQUIT signal.
|
||||
</para>
|
||||
</change>
|
||||
|
||||
<change type="bugfix">
|
||||
<para lang="ru">
|
||||
ÐÏÓÌÅ ÏÂÎÏ×ÌÅÎÉÑ ÉÓÐÏÌÎÑÅÍÏÇÏ ÆÁÊÌÁ ÎÁ ÌÅÔÕ ÎÁ Linux É Solaris
|
||||
ÎÁÚ×ÁÎÉÅ ÐÒÏÃÅÓÓÁ × ËÏÍÁÎÄÅ ps ÓÔÁÎÏ×ÉÌÏÓØ ËÏÒÏÞÅ.
|
||||
</para>
|
||||
<para lang="en">
|
||||
after on-line upgrade on Linux and Solaris the process name
|
||||
became shorter in the "ps" command.
|
||||
</para>
|
||||
</change>
|
||||
|
||||
</changes>
|
||||
|
||||
|
||||
<changes ver="0.1.39" date="14.07.2005">
|
||||
|
||||
<change>
|
||||
|
@ -8,7 +8,7 @@
|
||||
#define _NGINX_H_INCLUDED_
|
||||
|
||||
|
||||
#define NGINX_VER "nginx/0.1.39"
|
||||
#define NGINX_VER "nginx/0.1.40"
|
||||
|
||||
#define NGINX_VAR "NGINX"
|
||||
#define NGX_NEWPID_EXT ".newbin"
|
||||
|
@ -74,8 +74,6 @@ void ngx_http_empty_handler(ngx_event_t *wev);
|
||||
void ngx_http_request_empty_handler(ngx_http_request_t *r);
|
||||
|
||||
ngx_int_t ngx_http_send_last(ngx_http_request_t *r);
|
||||
void ngx_http_close_request(ngx_http_request_t *r, ngx_int_t error);
|
||||
void ngx_http_close_connection(ngx_connection_t *c);
|
||||
u_char * ngx_http_log_error_info(ngx_http_request_t *r, u_char *buf,
|
||||
size_t len);
|
||||
|
||||
|
@ -885,18 +885,6 @@ ngx_http_output_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
||||
}
|
||||
|
||||
|
||||
ngx_int_t
|
||||
ngx_http_redirect(ngx_http_request_t *r, int redirect)
|
||||
{
|
||||
/* STUB */
|
||||
|
||||
/* log request */
|
||||
|
||||
ngx_http_close_request(r, 0);
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
ngx_int_t
|
||||
ngx_http_set_exten(ngx_http_request_t *r)
|
||||
{
|
||||
|
@ -43,6 +43,8 @@ static void ngx_http_set_keepalive(ngx_http_request_t *r);
|
||||
static void ngx_http_keepalive_handler(ngx_event_t *ev);
|
||||
static void ngx_http_set_lingering_close(ngx_http_request_t *r);
|
||||
static void ngx_http_lingering_close_handler(ngx_event_t *ev);
|
||||
static void ngx_http_close_request(ngx_http_request_t *r, ngx_int_t error);
|
||||
static void ngx_http_close_connection(ngx_connection_t *c);
|
||||
|
||||
static u_char *ngx_http_log_error(ngx_log_t *log, u_char *buf, size_t len);
|
||||
static u_char *ngx_http_log_error_handler(ngx_http_request_t *r, u_char *buf,
|
||||
@ -756,6 +758,14 @@ ngx_http_process_request_headers(ngx_event_t *rev)
|
||||
if (rv == NGX_DECLINED) {
|
||||
header.len = r->header_in->end - r->header_name_start;
|
||||
header.data = r->header_name_start;
|
||||
|
||||
if (header.len > NGX_MAX_ERROR_STR - 300) {
|
||||
header.len = NGX_MAX_ERROR_STR - 300;
|
||||
header.data[header.len++] = '.';
|
||||
header.data[header.len++] = '.';
|
||||
header.data[header.len++] = '.';
|
||||
}
|
||||
|
||||
ngx_log_error(NGX_LOG_INFO, c->log, 0,
|
||||
"client sent too long header line: \"%V\"",
|
||||
&header);
|
||||
@ -2340,8 +2350,7 @@ ngx_http_close_request(ngx_http_request_t *r, ngx_int_t error)
|
||||
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, log, 0, "http close request");
|
||||
|
||||
if (r->pool == NULL) {
|
||||
ngx_log_error(NGX_LOG_ALERT, log, 0,
|
||||
"http request already closed");
|
||||
ngx_log_error(NGX_LOG_ALERT, log, 0, "http request already closed");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2389,8 +2398,8 @@ ngx_http_close_request(ngx_http_request_t *r, ngx_int_t error)
|
||||
|
||||
#if (NGX_HTTP_SSL)
|
||||
|
||||
void
|
||||
ngx_ssl_close_handler(ngx_event_t *ev)
|
||||
static void
|
||||
ngx_http_ssl_close_handler(ngx_event_t *ev)
|
||||
{
|
||||
ngx_connection_t *c;
|
||||
|
||||
@ -2408,7 +2417,7 @@ ngx_ssl_close_handler(ngx_event_t *ev)
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
static void
|
||||
ngx_http_close_connection(ngx_connection_t *c)
|
||||
{
|
||||
ngx_pool_t *pool;
|
||||
@ -2420,8 +2429,8 @@ ngx_http_close_connection(ngx_connection_t *c)
|
||||
|
||||
if (c->ssl) {
|
||||
if (ngx_ssl_shutdown(c) == NGX_AGAIN) {
|
||||
c->read->handler = ngx_ssl_close_handler;
|
||||
c->write->handler = ngx_ssl_close_handler;
|
||||
c->read->handler = ngx_http_ssl_close_handler;
|
||||
c->write->handler = ngx_http_ssl_close_handler;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +118,11 @@ ngx_http_upstream_header_t ngx_http_upstream_headers_in[] = {
|
||||
|
||||
{ ngx_string("Set-Cookie"),
|
||||
ngx_http_upstream_ignore_header_line, 0,
|
||||
ngx_http_upstream_copy_header_line, 0, 0 },
|
||||
ngx_http_upstream_copy_header_line, 0, 1 },
|
||||
|
||||
{ ngx_string("Content-Disposition"),
|
||||
ngx_http_upstream_ignore_header_line, 0,
|
||||
ngx_http_upstream_copy_header_line, 0, 1 },
|
||||
|
||||
{ ngx_string("Cache-Control"),
|
||||
ngx_http_upstream_process_multi_header_lines,
|
||||
@ -221,14 +225,13 @@ ngx_http_upstream_init(ngx_http_request_t *r)
|
||||
}
|
||||
|
||||
r->read_event_handler = ngx_http_upstream_rd_check_broken_connection;
|
||||
r->write_event_handler = ngx_http_upstream_wr_check_broken_connection;
|
||||
|
||||
if (ngx_event_flags & NGX_USE_CLEAR_EVENT) {
|
||||
|
||||
r->write_event_handler = ngx_http_upstream_wr_check_broken_connection;
|
||||
|
||||
if (!c->write->active) {
|
||||
if (ngx_add_event(c->write, NGX_WRITE_EVENT,
|
||||
NGX_CLEAR_EVENT) == NGX_ERROR)
|
||||
if (ngx_add_event(c->write, NGX_WRITE_EVENT, NGX_CLEAR_EVENT)
|
||||
== NGX_ERROR)
|
||||
{
|
||||
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
|
||||
return;
|
||||
|
@ -264,6 +264,8 @@ ngx_imap_proxy_imap_handler(ngx_event_t *rev)
|
||||
s->connection->write->handler = ngx_imap_proxy_handler;
|
||||
rev->handler = ngx_imap_proxy_handler;
|
||||
c->write->handler = ngx_imap_proxy_handler;
|
||||
|
||||
ngx_del_timer(c->read);
|
||||
}
|
||||
}
|
||||
|
||||
@ -384,6 +386,8 @@ ngx_imap_proxy_pop3_handler(ngx_event_t *rev)
|
||||
s->connection->write->handler = ngx_imap_proxy_handler;
|
||||
rev->handler = ngx_imap_proxy_handler;
|
||||
c->write->handler = ngx_imap_proxy_handler;
|
||||
|
||||
ngx_del_timer(c->read);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -232,22 +232,22 @@ void ngx_os_status(ngx_log_t *log)
|
||||
{
|
||||
ngx_uint_t i;
|
||||
|
||||
ngx_log_error(NGX_LOG_INFO, log, 0, "OS: %s %s",
|
||||
ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s",
|
||||
ngx_freebsd_kern_ostype, ngx_freebsd_kern_osrelease);
|
||||
|
||||
#ifdef __DragonFly_version
|
||||
ngx_log_error(NGX_LOG_INFO, log, 0,
|
||||
ngx_log_error(NGX_LOG_NOTICE, log, 0,
|
||||
"kern.osreldate: %d, built on %d",
|
||||
ngx_freebsd_kern_osreldate, __DragonFly_version);
|
||||
#else
|
||||
ngx_log_error(NGX_LOG_INFO, log, 0,
|
||||
ngx_log_error(NGX_LOG_NOTICE, log, 0,
|
||||
"kern.osreldate: %d, built on %d",
|
||||
ngx_freebsd_kern_osreldate, __FreeBSD_version);
|
||||
#endif
|
||||
|
||||
for (i = 0; sysctls[i].name; i++) {
|
||||
if (sysctls[i].exists) {
|
||||
ngx_log_error(NGX_LOG_INFO, log, 0, "%s: %d",
|
||||
ngx_log_error(NGX_LOG_NOTICE, log, 0, "%s: %d",
|
||||
sysctls[i].name, *sysctls[i].value);
|
||||
}
|
||||
}
|
||||
|
@ -81,10 +81,10 @@ ngx_os_init(ngx_log_t *log)
|
||||
void
|
||||
ngx_os_status(ngx_log_t *log)
|
||||
{
|
||||
ngx_log_error(NGX_LOG_INFO, log, 0, "OS: %s %s",
|
||||
ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s",
|
||||
ngx_linux_kern_ostype, ngx_linux_kern_osrelease);
|
||||
|
||||
ngx_log_error(NGX_LOG_INFO, log, 0, "sysctl(KERN_RTSIGMAX): %d",
|
||||
ngx_log_error(NGX_LOG_NOTICE, log, 0, "sysctl(KERN_RTSIGMAX): %d",
|
||||
ngx_linux_rtsig_max);
|
||||
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_setproctitle.h>
|
||||
|
||||
|
||||
ngx_int_t ngx_ncpu;
|
||||
@ -137,7 +136,7 @@ ngx_int_t ngx_posix_init(ngx_log_t *log)
|
||||
|
||||
void ngx_posix_status(ngx_log_t *log)
|
||||
{
|
||||
ngx_log_error(NGX_LOG_INFO, log, 0,
|
||||
ngx_log_error(NGX_LOG_NOTICE, log, 0,
|
||||
"getrlimit(RLIMIT_NOFILE): %r:%r",
|
||||
rlmt.rlim_cur, rlmt.rlim_max);
|
||||
}
|
||||
|
@ -8,6 +8,9 @@
|
||||
#define _NGX_PROCESS_H_INCLUDED_
|
||||
|
||||
|
||||
#include <ngx_setproctitle.h>
|
||||
|
||||
|
||||
typedef pid_t ngx_pid_t;
|
||||
|
||||
typedef void (*ngx_spawn_proc_pt) (ngx_cycle_t *cycle, void *data);
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_event.h>
|
||||
#include <ngx_setproctitle.h>
|
||||
#include <ngx_channel.h>
|
||||
|
||||
|
||||
@ -69,11 +68,13 @@ ngx_master_process_cycle(ngx_cycle_t *cycle)
|
||||
u_char *p;
|
||||
size_t size;
|
||||
ngx_int_t i;
|
||||
ngx_uint_t n;
|
||||
sigset_t set;
|
||||
struct timeval tv;
|
||||
struct itimerval itv;
|
||||
ngx_uint_t live;
|
||||
ngx_msec_t delay;
|
||||
ngx_listening_t *ls;
|
||||
ngx_core_conf_t *ccf;
|
||||
|
||||
sigemptyset(&set);
|
||||
@ -179,6 +180,17 @@ ngx_master_process_cycle(ngx_cycle_t *cycle)
|
||||
if (ngx_quit) {
|
||||
ngx_signal_worker_processes(cycle,
|
||||
ngx_signal_value(NGX_SHUTDOWN_SIGNAL));
|
||||
|
||||
ls = cycle->listening.elts;
|
||||
for (n = 0; n < cycle->listening.nelts; n++) {
|
||||
if (ngx_close_socket(ls[n].fd) == -1) {
|
||||
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_socket_errno,
|
||||
ngx_close_socket_n " %V failed",
|
||||
&ls[n].addr_text);
|
||||
}
|
||||
}
|
||||
cycle->listening.nelts = 0;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_setproctitle.h>
|
||||
|
||||
|
||||
#if (NGX_SETPROCTITLE_USES_ENV)
|
||||
|
@ -61,10 +61,10 @@ ngx_int_t ngx_os_init(ngx_log_t *log)
|
||||
void ngx_os_status(ngx_log_t *log)
|
||||
{
|
||||
|
||||
ngx_log_error(NGX_LOG_INFO, log, 0, "OS: %s %s",
|
||||
ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s",
|
||||
ngx_solaris_sysname, ngx_solaris_release);
|
||||
|
||||
ngx_log_error(NGX_LOG_INFO, log, 0, "version: %s",
|
||||
ngx_log_error(NGX_LOG_NOTICE, log, 0, "version: %s",
|
||||
ngx_solaris_version);
|
||||
|
||||
ngx_posix_status(log);
|
||||
|
Loading…
Reference in New Issue
Block a user