summaryrefslogtreecommitdiffhomepage
path: root/src/http
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-04-08 15:58:25 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-04-08 15:58:25 +0000
commitfff32326ca9009ebba0aadd24aa0683afe0d4a02 (patch)
treeac738d570dd46b0ef6b15b09b42d9956245f5005 /src/http
parent9a864bd8f87efd0fa23f552d4277475dd76bcea4 (diff)
downloadnginx-fff32326ca9009ebba0aadd24aa0683afe0d4a02.tar.gz
nginx-fff32326ca9009ebba0aadd24aa0683afe0d4a02.tar.bz2
nginx-0.0.3-2004-04-08-19:58:25 import
Diffstat (limited to 'src/http')
-rw-r--r--src/http/modules/ngx_http_charset_filter.c10
-rw-r--r--src/http/ngx_http_core_module.c8
-rw-r--r--src/http/ngx_http_request.c4
-rw-r--r--src/http/ngx_http_write_filter.c2
4 files changed, 17 insertions, 7 deletions
diff --git a/src/http/modules/ngx_http_charset_filter.c b/src/http/modules/ngx_http_charset_filter.c
index a545eafa1..052a1f822 100644
--- a/src/http/modules/ngx_http_charset_filter.c
+++ b/src/http/modules/ngx_http_charset_filter.c
@@ -62,6 +62,12 @@ static int ngx_http_charset_header_filter(ngx_http_request_t *r)
{
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 @@ static int ngx_http_charset_header_filter(ngx_http_request_t *r)
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 @@ static char *ngx_http_charset_merge_loc_conf(ngx_conf_t *cf,
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 3ae61829f..6b0db2625 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -482,7 +482,9 @@ int ngx_http_find_location_config(ngx_http_request_t *r)
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 @@ int ngx_http_find_location_config(ngx_http_request_t *r)
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 a2a0feda6..9233f89d8 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -231,7 +231,9 @@ static void ngx_http_init_request(ngx_event_t *rev)
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 5fa144fbc..8c1a98a91 100644
--- a/src/http/ngx_http_write_filter.c
+++ b/src/http/ngx_http_write_filter.c
@@ -133,7 +133,7 @@ int ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
* 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;
}