Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev ][Date Next ][Thread Prev ][Thread Next ][Date Index ][Thread Index ]
Re: sub_filter bug?
On Mon, Oct 01, 2007 at 09:57:14PM +0400, dewil wrote:
> не помог.
> debug еще сделать?
Предыдущий патч откать, новый накатить.
--
Игорь Сысоев
http://sysoev.ru
Index: src/http/modules/ngx_http_sub_filter_module.c
===================================================================
--- src/http/modules/ngx_http_sub_filter_module.c (revision 875)
+++ src/http/modules/ngx_http_sub_filter_module.c (working copy)
@@ -562,6 +562,7 @@
ch = ngx_tolower(ch);
}
+ ctx->state = state;
ctx->pos = p;
ctx->looked = looked;
ctx->copy_end = p;
@@ -583,6 +584,10 @@
looked++;
if (looked == ctx->match.len) {
+ if (p - ctx->pos < looked) {
+ ctx->saved = 0;
+ }
+
ctx->state = sub_start_state;
ctx->pos = p + 1;
ctx->looked = looked;