nginx-0.0.3-2004-04-08-19:58:25 import
diff --git a/src/http/modules/ngx_http_charset_filter.c b/src/http/modules/ngx_http_charset_filter.c
index a545eaf..052a1f8 100644
--- a/src/http/modules/ngx_http_charset_filter.c
+++ b/src/http/modules/ngx_http_charset_filter.c
@@ -62,6 +62,12 @@
{
ngx_http_charset_loc_conf_t *lcf;
+ lcf = ngx_http_get_module_loc_conf(r, ngx_http_charset_filter_module);
+
+ if (lcf->default_charset.len == 0) {
+ return ngx_http_next_header_filter(r);
+ }
+
if (r->headers_out.content_type == NULL
|| ngx_strncasecmp(r->headers_out.content_type->value.data,
"text/", 5) != 0
@@ -72,8 +78,6 @@
return ngx_http_next_header_filter(r);
}
- lcf = ngx_http_get_module_loc_conf(r, ngx_http_charset_filter_module);
-
if (r->headers_out.status == NGX_HTTP_MOVED_PERMANENTLY
&& r->headers_out.status == NGX_HTTP_MOVED_TEMPORARILY)
{
@@ -135,7 +139,7 @@
ngx_http_charset_loc_conf_t *conf = child;
ngx_conf_merge_str_value(conf->default_charset,
- prev->default_charset, "koi8-r");
+ prev->default_charset, "");
return NGX_CONF_OK;
}
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 3ae6182..6b0db26 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -482,7 +482,9 @@
r->loc_conf = clcfp[i]->loc_conf;
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
r->connection->log->file = clcf->err_log->file;
- r->connection->log->log_level = clcf->err_log->log_level;
+ if (!(r->connection->log->log_level & NGX_LOG_DEBUG_CONNECTION)) {
+ r->connection->log->log_level = clcf->err_log->log_level;
+ }
if (clcfp[i]->exact_match && r->uri.len == clcfp[i]->name.len) {
#if (HAVE_PCRE)
@@ -529,7 +531,9 @@
r->loc_conf = clcfp[i]->loc_conf;
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
r->connection->log->file = clcf->err_log->file;
- r->connection->log->log_level = clcf->err_log->log_level;
+ if (!(r->connection->log->log_level & NGX_LOG_DEBUG_CONNECTION)) {
+ r->connection->log->log_level = clcf->err_log->log_level;
+ }
break;
}
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index a2a0fed..9233f89 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -231,7 +231,9 @@
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
c->log->file = clcf->err_log->file;
- c->log->log_level = clcf->err_log->log_level;
+ if (!(c->log->log_level & NGX_LOG_DEBUG_CONNECTION)) {
+ c->log->log_level = clcf->err_log->log_level;
+ }
if (c->buffer == NULL) {
c->buffer = ngx_create_temp_hunk(c->pool,
diff --git a/src/http/ngx_http_write_filter.c b/src/http/ngx_http_write_filter.c
index 5fa144f..8c1a98a 100644
--- a/src/http/ngx_http_write_filter.c
+++ b/src/http/ngx_http_write_filter.c
@@ -133,7 +133,7 @@
* the size of the hunks is smaller than "postpone_output" directive
*/
- if (!last && flush == 0 && size < conf->postpone_output) {
+ if (!last && flush == 0 && size < (off_t) conf->postpone_output) {
return NGX_OK;
}