aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-10-02 18:53:31 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-10-02 18:53:31 +0000
commitd2582b9619615f79456db87be336d50b09a13e74 (patch)
treeb53f8550f77d14e2041f1b28efaa3877eda43744 /src
parenta103646402e0451a1823b1e505780852377323ec (diff)
downloadnginx-d2582b9619615f79456db87be336d50b09a13e74.tar.gz
nginx-d2582b9619615f79456db87be336d50b09a13e74.zip
*) add sub_filter parser fix similar to r1261 in SSI parser
*) fix case when pattern is split between two buffers: it had been fixed in SSI parser long ago
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_sub_filter_module.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_sub_filter_module.c b/src/http/modules/ngx_http_sub_filter_module.c
index a9fe8d407..93d1b36ef 100644
--- a/src/http/modules/ngx_http_sub_filter_module.c
+++ b/src/http/modules/ngx_http_sub_filter_module.c
@@ -562,6 +562,7 @@ ngx_http_sub_parse(ngx_http_request_t *r, ngx_http_sub_ctx_t *ctx)
ch = ngx_tolower(ch);
}
+ ctx->state = state;
ctx->pos = p;
ctx->looked = looked;
ctx->copy_end = p;
@@ -583,6 +584,10 @@ ngx_http_sub_parse(ngx_http_request_t *r, ngx_http_sub_ctx_t *ctx)
looked++;
if (looked == ctx->match.len) {
+ if ((size_t) (p - ctx->pos) < looked) {
+ ctx->saved = 0;
+ }
+
ctx->state = sub_start_state;
ctx->pos = p + 1;
ctx->looked = looked;