Mercurial > hg > nginx
changeset 5810:5322be87fc02
Sub filter: fixed matching for a single character.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Mon, 25 Aug 2014 16:08:55 +0400 |
parents | bb26f7ceaaf1 |
children | f5b612019042 |
files | src/http/modules/ngx_http_sub_filter_module.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_sub_filter_module.c Wed Aug 20 13:13:27 2014 +0400 +++ b/src/http/modules/ngx_http_sub_filter_module.c Mon Aug 25 16:08:55 2014 +0400 @@ -546,6 +546,14 @@ for ( ;; ) { if (ch == match) { + + if (ctx->match.len == 1) { + ctx->pos = p + 1; + ctx->copy_end = p; + + return NGX_OK; + } + copy_end = p; ctx->looked.data[0] = *p; looked = 1;