sub_filter bug?

Igor Sysoev is at rambler-co.ru
Mon Oct 1 22:33:24 MSD 2007


On Mon, Oct 01, 2007 at 09:57:14PM +0400, dewil wrote:

> не помог.
> debug еще сделать?

Предыдущий патч откать, новый накатить.


-- 
Игорь Сысоев
http://sysoev.ru
-------------- next part --------------
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;


More information about the nginx-ru mailing list