diff options
author | Valentin Bartenev <vbart@nginx.com> | 2014-08-25 16:08:55 +0400 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2014-08-25 16:08:55 +0400 |
commit | 9fb2b9287d5be640ac6bfaa5f7885d439618256a (patch) | |
tree | 4cb553a7293de9b8358e1c3f3542beeb45f888ea /src | |
parent | c7efcf6ba6836045becd754e4b176ffbd5d3190b (diff) | |
download | nginx-9fb2b9287d5be640ac6bfaa5f7885d439618256a.tar.gz nginx-9fb2b9287d5be640ac6bfaa5f7885d439618256a.zip |
Sub filter: fixed matching for a single character.
Diffstat (limited to 'src')
-rw-r--r-- | src/http/modules/ngx_http_sub_filter_module.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_sub_filter_module.c b/src/http/modules/ngx_http_sub_filter_module.c index 5e6e038bf..e6a34a763 100644 --- a/src/http/modules/ngx_http_sub_filter_module.c +++ b/src/http/modules/ngx_http_sub_filter_module.c @@ -546,6 +546,14 @@ ngx_http_sub_parse(ngx_http_request_t *r, ngx_http_sub_ctx_t *ctx) 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; |