Sub filter: fixed matching for a single character.

This commit is contained in:
Valentin Bartenev 2014-08-25 16:08:55 +04:00
parent c7efcf6ba6
commit 9fb2b9287d

View File

@ -546,6 +546,14 @@ ngx_http_sub_parse(ngx_http_request_t *r, ngx_http_sub_ctx_t *ctx)
for ( ;; ) { for ( ;; ) {
if (ch == match) { if (ch == match) {
if (ctx->match.len == 1) {
ctx->pos = p + 1;
ctx->copy_end = p;
return NGX_OK;
}
copy_end = p; copy_end = p;
ctx->looked.data[0] = *p; ctx->looked.data[0] = *p;
looked = 1; looked = 1;