comparison src/http/modules/ngx_http_sub_filter_module.c @ 1557:9d094e581587

*) 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
author Igor Sysoev <igor@sysoev.ru>
date Tue, 02 Oct 2007 18:53:31 +0000
parents 76fe59c6fafb
children c10e7b563fb4
comparison
equal deleted inserted replaced
1556:3dc408adbb70 1557:9d094e581587
560 560
561 ch = *p; 561 ch = *p;
562 ch = ngx_tolower(ch); 562 ch = ngx_tolower(ch);
563 } 563 }
564 564
565 ctx->state = state;
565 ctx->pos = p; 566 ctx->pos = p;
566 ctx->looked = looked; 567 ctx->looked = looked;
567 ctx->copy_end = p; 568 ctx->copy_end = p;
568 569
569 if (ctx->copy_start == NULL) { 570 if (ctx->copy_start == NULL) {
581 582
582 if (ch == ctx->match.data[looked]) { 583 if (ch == ctx->match.data[looked]) {
583 looked++; 584 looked++;
584 585
585 if (looked == ctx->match.len) { 586 if (looked == ctx->match.len) {
587 if ((size_t) (p - ctx->pos) < looked) {
588 ctx->saved = 0;
589 }
590
586 ctx->state = sub_start_state; 591 ctx->state = sub_start_state;
587 ctx->pos = p + 1; 592 ctx->pos = p + 1;
588 ctx->looked = looked; 593 ctx->looked = looked;
589 ctx->copy_end = copy_end; 594 ctx->copy_end = copy_end;
590 595