fix empty string replacement in sub_filter

This commit is contained in:
Igor Sysoev 2007-10-01 16:24:15 +00:00
parent fa928a6c66
commit d13045f16c

View File

@ -369,10 +369,15 @@ ngx_http_sub_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
}
}
if (ctx->sub.len) {
b->memory = 1;
b->pos = ctx->sub.data;
b->last = ctx->sub.data + ctx->sub.len;
} else {
b->sync = 1;
}
cl->buf = b;
cl->next = NULL;
*ctx->last_out = cl;