Mercurial > hg > nginx
comparison src/http/modules/ngx_http_ssi_filter_module.c @ 635:18268abd340c release-0.3.39
nginx-0.3.39-RELEASE import
*) Feature: the "uninitialized_variable_warn" directive; the logging
level of the "uninitialized variable" message was lowered from
"alert" to "warn".
*) Feature: the "override_charset" directive.
*) Change: now if the unknown variable is used in the "echo" and "if
expr='$name'" SSI-commands, then the "unknown variable" message is
not logged.
*) Bugfix: the active connection counter increased on the exceeding of
the connection limit specified by the "worker_connections"
directive; the bug had appeared in 0.2.0.
*) Bugfix: the limit rate might not work on some condition; the bug had
appeared in 0.3.38.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 17 Apr 2006 19:55:41 +0000 |
parents | 65bf042c0b4f |
children | e60fe4cf1d4e |
comparison
equal
deleted
inserted
replaced
634:af8e20368022 | 635:18268abd340c |
---|---|
12 | 12 |
13 #define NGX_HTTP_SSI_DATE_LEN 2048 | 13 #define NGX_HTTP_SSI_DATE_LEN 2048 |
14 | 14 |
15 #define NGX_HTTP_SSI_ADD_PREFIX 1 | 15 #define NGX_HTTP_SSI_ADD_PREFIX 1 |
16 #define NGX_HTTP_SSI_ADD_ZERO 2 | 16 #define NGX_HTTP_SSI_ADD_ZERO 2 |
17 #define NGX_HTTP_SSI_EXPR_TEST 4 | |
17 | 18 |
18 | 19 |
19 typedef struct { | 20 typedef struct { |
20 ngx_flag_t enable; | 21 ngx_flag_t enable; |
21 ngx_flag_t silent_errors; | 22 ngx_flag_t silent_errors; |
1500 } | 1501 } |
1501 | 1502 |
1502 val = ngx_http_ssi_get_variable(r, &var, key); | 1503 val = ngx_http_ssi_get_variable(r, &var, key); |
1503 | 1504 |
1504 if (val == NULL) { | 1505 if (val == NULL) { |
1505 vv = ngx_http_get_variable(r, &var, key); | 1506 vv = ngx_http_get_variable(r, &var, key, |
1506 | 1507 flags & NGX_HTTP_SSI_EXPR_TEST); |
1507 if (vv == NULL) { | 1508 if (vv == NULL) { |
1508 return NGX_ERROR; | 1509 return NGX_ERROR; |
1509 } | 1510 } |
1510 | 1511 |
1511 if (vv->not_found) { | 1512 if (vv->not_found) { |
1679 } | 1680 } |
1680 | 1681 |
1681 value = ngx_http_ssi_get_variable(r, var, key); | 1682 value = ngx_http_ssi_get_variable(r, var, key); |
1682 | 1683 |
1683 if (value == NULL) { | 1684 if (value == NULL) { |
1684 vv = ngx_http_get_variable(r, var, key); | 1685 vv = ngx_http_get_variable(r, var, key, 1); |
1685 | 1686 |
1686 if (vv == NULL) { | 1687 if (vv == NULL) { |
1687 return NGX_HTTP_SSI_ERROR; | 1688 return NGX_HTTP_SSI_ERROR; |
1688 } | 1689 } |
1689 | 1690 |
1871 | 1872 |
1872 while (p < last && *p == ' ') { | 1873 while (p < last && *p == ' ') { |
1873 p++; | 1874 p++; |
1874 } | 1875 } |
1875 | 1876 |
1877 flags = (p == last) ? NGX_HTTP_SSI_EXPR_TEST : 0; | |
1878 | |
1876 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 1879 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
1877 "left: \"%V\"", &left); | 1880 "left: \"%V\"", &left); |
1878 | 1881 |
1879 if (ngx_http_ssi_evaluate_string(r, ctx, &left, 0) != NGX_OK) { | 1882 if (ngx_http_ssi_evaluate_string(r, ctx, &left, flags) != NGX_OK) { |
1880 return NGX_HTTP_SSI_ERROR; | 1883 return NGX_HTTP_SSI_ERROR; |
1881 } | 1884 } |
1882 | 1885 |
1883 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 1886 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
1884 "evaluted left: \"%V\"", &left); | 1887 "evaluted left: \"%V\"", &left); |