diff src/http/modules/ngx_http_sub_filter_module.c @ 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 e491b26fa5a1
children b9447fc457b4
line wrap: on
line diff
--- 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
 
             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;