mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 14:13:33 -06:00
*) 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
This commit is contained in:
parent
a103646402
commit
d2582b9619
@ -562,6 +562,7 @@ ngx_http_sub_parse(ngx_http_request_t *r, ngx_http_sub_ctx_t *ctx)
|
|||||||
ch = ngx_tolower(ch);
|
ch = ngx_tolower(ch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctx->state = state;
|
||||||
ctx->pos = p;
|
ctx->pos = p;
|
||||||
ctx->looked = looked;
|
ctx->looked = looked;
|
||||||
ctx->copy_end = p;
|
ctx->copy_end = p;
|
||||||
@ -583,6 +584,10 @@ ngx_http_sub_parse(ngx_http_request_t *r, ngx_http_sub_ctx_t *ctx)
|
|||||||
looked++;
|
looked++;
|
||||||
|
|
||||||
if (looked == ctx->match.len) {
|
if (looked == ctx->match.len) {
|
||||||
|
if ((size_t) (p - ctx->pos) < looked) {
|
||||||
|
ctx->saved = 0;
|
||||||
|
}
|
||||||
|
|
||||||
ctx->state = sub_start_state;
|
ctx->state = sub_start_state;
|
||||||
ctx->pos = p + 1;
|
ctx->pos = p + 1;
|
||||||
ctx->looked = looked;
|
ctx->looked = looked;
|
||||||
|
Loading…
Reference in New Issue
Block a user