mirror of
https://github.com/nginx/nginx.git
synced 2024-12-27 17:31:35 -06:00
nginx-0.3.52-RELEASE import
*) Change: the ngx_http_index_module behavior for the "POST /" requests is reverted to the 0.3.40 version state: the module now does not return the 405 error. *) Bugfix: the worker process may got caught in an endless loop if the limit rate was used; the bug had appeared in 0.3.37. *) Bugfix: ngx_http_charset_module logged "unknown charset" alert, even if the recoding was not needed; the bug had appeared in 0.3.50. *) Bugfix: if a code response of the PUT request was 409, then a temporary file was not removed.
This commit is contained in:
parent
9f408ae228
commit
3186bf5369
@ -9,6 +9,57 @@
|
||||
<title lang="en">nginx changelog</title>
|
||||
|
||||
|
||||
<changes ver="0.3.52" date="03.07.2006">
|
||||
|
||||
<change type="change">
|
||||
<para lang="ru">
|
||||
×ÏÓÓÔÁÎÏ×ÌÅÎÏ ÐÏ×ÅÄÅÎÉÅ ÍÏÄÕÌÑ ngx_http_index_module ÄÌÑ ÚÁÐÒÏÓÏ× "POST /":
|
||||
ËÁË × ×ÅÒÓÉÉ ÄÏ 0.3.40, ÍÏÄÕÌØ ÔÅÐÅÒØ ÎÅ ×ÙÄÁ£Ô ÏÛÉÂËÕ 405.
|
||||
</para>
|
||||
<para lang="en">
|
||||
the ngx_http_index_module behavior for the "POST /" requests is reverted
|
||||
to the 0.3.40 version state: the module now does not return the 405 error.
|
||||
</para>
|
||||
</change>
|
||||
|
||||
<change type="bugfix">
|
||||
<para lang="ru">
|
||||
ÐÒÉ ÉÓÐÏÌØÚÏ×ÁÎÉÉ ÏÇÒÁÎÉÞÅÎÉÑ ÓËÏÒÏÓÔÉ ÒÁÂÏÞÉÊ ÐÒÏÃÅÓÓ ÍÏÇ ÚÁÃÉËÌÉÔØÓÑ;
|
||||
ÏÛÉÂËÁ ÐÏÑ×ÉÌÁÓØ × 0.3.37.
|
||||
</para>
|
||||
<para lang="en">
|
||||
the worker process may got caught in an endless loop if the limit rate was used;
|
||||
bug appeared in 0.3.37.
|
||||
</para>
|
||||
</change>
|
||||
|
||||
<change type="bugfix">
|
||||
<para lang="ru">
|
||||
ÍÏÄÕÌØ ngx_http_charset_module ÚÁÐÉÓÙ×ÁÌ × ÌÏÇ ÏÛÉÂËÕ "unknown charset",
|
||||
ÄÁÖÅ ÅÓÌÉ ÐÅÒÅËÏÄÉÒÏ×ËÁ ÎÅ ÔÒÅÂÏ×ÁÌÁÓØ;
|
||||
ÏÛÉÂËÁ ÐÏÑ×ÉÌÁÓØ × 0.3.50.
|
||||
</para>
|
||||
<para lang="en">
|
||||
ngx_http_charset_module logged "unknown charset" alert, even if the recoding
|
||||
was not needed;
|
||||
bug appeared in 0.3.50.
|
||||
</para>
|
||||
</change>
|
||||
|
||||
<change type="bugfix">
|
||||
<para lang="ru">
|
||||
ÅÓÌÉ × ÒÅÚÕÌØÔÁÔÅ ÚÁÐÒÏÓÁ PUT ×ÏÚ×ÒÁÝÁÌÓÑ ËÏÄ 409, ÔÏ ×ÒÅÍÅÎÎÙÊ ÆÁÊÌ
|
||||
ÎÅ ÕÄÁÌÑÌÓÑ.
|
||||
</para>
|
||||
<para lang="en">
|
||||
if a code response of the PUT request was 409, then a temporary file
|
||||
was not removed.
|
||||
</para>
|
||||
</change>
|
||||
|
||||
</changes>
|
||||
|
||||
|
||||
<changes ver="0.3.51" date="30.06.2006">
|
||||
|
||||
<change type="bugfix">
|
||||
|
@ -8,7 +8,7 @@
|
||||
#define _NGINX_H_INCLUDED_
|
||||
|
||||
|
||||
#define NGINX_VER "nginx/0.3.51"
|
||||
#define NGINX_VER "nginx/0.3.52"
|
||||
|
||||
#define NGINX_VAR "NGINX"
|
||||
#define NGX_OLDPID_EXT ".oldbin"
|
||||
|
@ -259,6 +259,10 @@ ngx_conf_set_path_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
|
||||
path->name = value[1];
|
||||
|
||||
if (path->name.data[path->name.len - 1] == '/') {
|
||||
path->name.len--;
|
||||
}
|
||||
|
||||
if (ngx_conf_full_name(cf->cycle, &path->name) == NGX_ERROR) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ ngx_http_charset_header_filter(ngx_http_request_t *r)
|
||||
r->headers_out.override_charset->data);
|
||||
|
||||
if (charset == NGX_HTTP_NO_CHARSET) {
|
||||
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
|
||||
"unknown charset \"%V\" to override",
|
||||
r->headers_out.override_charset);
|
||||
|
||||
@ -269,18 +269,8 @@ ngx_http_charset_header_filter(ngx_http_request_t *r)
|
||||
|
||||
ctx->charset = charset;
|
||||
|
||||
if (charset == NGX_HTTP_NO_CHARSET) {
|
||||
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||
"unknown charset \"%V\" of main request", mc);
|
||||
|
||||
return ngx_http_next_header_filter(r);
|
||||
}
|
||||
}
|
||||
|
||||
charset = ctx->charset;
|
||||
|
||||
if (charset == NGX_HTTP_NO_CHARSET) {
|
||||
return ngx_http_next_header_filter(r);
|
||||
} else {
|
||||
charset = ctx->charset;
|
||||
}
|
||||
}
|
||||
|
||||
@ -289,16 +279,41 @@ ngx_http_charset_header_filter(ngx_http_request_t *r)
|
||||
if (r->headers_out.charset.len == 0) {
|
||||
lcf = ngx_http_get_module_loc_conf(r, ngx_http_charset_filter_module);
|
||||
|
||||
return ngx_http_charset_set_charset(r, mcf->charsets.elts, charset,
|
||||
lcf->source_charset);
|
||||
if (charset != NGX_HTTP_NO_CHARSET) {
|
||||
return ngx_http_charset_set_charset(r, mcf->charsets.elts, charset,
|
||||
lcf->source_charset);
|
||||
}
|
||||
|
||||
if (lcf->source_charset == NGX_CONF_UNSET) {
|
||||
return ngx_http_next_header_filter(r);
|
||||
}
|
||||
|
||||
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
|
||||
"no \"charset_map\" between the charsets "
|
||||
"\"%V\" and \"%V\"",
|
||||
&charsets[lcf->source_charset].name,
|
||||
&r->main->headers_out.charset);
|
||||
|
||||
return ngx_http_next_header_filter(r);
|
||||
}
|
||||
|
||||
source_charset = ngx_http_charset_get_charset(charsets, n,
|
||||
r->headers_out.charset.data);
|
||||
|
||||
if (source_charset == NGX_HTTP_NO_CHARSET) {
|
||||
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||
"unknown source charset \"%V\"", &r->headers_out.charset);
|
||||
if (charset == NGX_HTTP_NO_CHARSET
|
||||
|| source_charset == NGX_HTTP_NO_CHARSET)
|
||||
{
|
||||
if (charset != source_charset
|
||||
|| ngx_strcasecmp(r->main->headers_out.charset.data,
|
||||
r->headers_out.charset.data)
|
||||
!= 0)
|
||||
{
|
||||
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
|
||||
"no \"charset_map\" between the charsets "
|
||||
"\"%V\" and \"%V\"",
|
||||
&r->headers_out.charset,
|
||||
&r->main->headers_out.charset);
|
||||
}
|
||||
|
||||
return ngx_http_next_header_filter(r);
|
||||
}
|
||||
@ -307,7 +322,7 @@ ngx_http_charset_header_filter(ngx_http_request_t *r)
|
||||
&& (charsets[source_charset].tables == NULL
|
||||
|| charsets[source_charset].tables[charset] == NULL))
|
||||
{
|
||||
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
|
||||
"no \"charset_map\" between the charsets "
|
||||
"\"%V\" and \"%V\"",
|
||||
&charsets[source_charset].name, &charsets[charset].name);
|
||||
|
@ -254,6 +254,12 @@ ngx_http_dav_put_handler(ngx_http_request_t *r)
|
||||
}
|
||||
|
||||
if (ngx_is_dir(&fi)) {
|
||||
if (ngx_delete_file(temp->data) == NGX_FILE_ERROR) {
|
||||
ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno,
|
||||
ngx_delete_file_n " \"%s\" failed",
|
||||
temp->data);
|
||||
}
|
||||
|
||||
ngx_http_finalize_request(r, NGX_HTTP_CONFLICT);
|
||||
return;
|
||||
}
|
||||
@ -296,6 +302,12 @@ ngx_http_dav_put_handler(ngx_http_request_t *r)
|
||||
|
||||
#endif
|
||||
|
||||
if (ngx_delete_file(temp->data) == NGX_FILE_ERROR) {
|
||||
ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno,
|
||||
ngx_delete_file_n " \"%s\" failed",
|
||||
temp->data);
|
||||
}
|
||||
|
||||
ngx_http_finalize_request(r, ngx_http_dav_error(r, err, NGX_HTTP_CONFLICT,
|
||||
ngx_rename_file_n,
|
||||
path.data));
|
||||
|
@ -143,10 +143,6 @@ ngx_http_index_handler(ngx_http_request_t *r)
|
||||
return NGX_DECLINED;
|
||||
}
|
||||
|
||||
if (!(r->method & (NGX_HTTP_GET|NGX_HTTP_HEAD))) {
|
||||
return NGX_DECLINED;
|
||||
}
|
||||
|
||||
log = r->connection->log;
|
||||
|
||||
/*
|
||||
|
@ -215,7 +215,7 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
||||
if (to_send <= 0) {
|
||||
c->write->delayed = 1;
|
||||
ngx_add_timer(r->connection->write,
|
||||
(ngx_msec_t) (- to_send * 1000 / r->limit_rate));
|
||||
(ngx_msec_t) (- to_send * 1000 / r->limit_rate + 1));
|
||||
|
||||
c->buffered |= NGX_HTTP_WRITE_BUFFERED;
|
||||
|
||||
@ -245,7 +245,7 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
||||
sent = c->sent - sent;
|
||||
c->write->delayed = 1;
|
||||
ngx_add_timer(r->connection->write,
|
||||
(ngx_msec_t) (sent * 1000 / r->limit_rate));
|
||||
(ngx_msec_t) (sent * 1000 / r->limit_rate + 1));
|
||||
}
|
||||
|
||||
for (cl = r->out; cl && cl != chain; /* void */) {
|
||||
|
Loading…
Reference in New Issue
Block a user