Skip to content

Commit e211b1e

Browse files
committed
style fix
1 parent 060e767 commit e211b1e

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/ngx_http_lua_bodyfilterby.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ ngx_int_t
8686
ngx_http_lua_body_filter_by_chunk(lua_State *L, ngx_http_request_t *r,
8787
ngx_chain_t *in)
8888
{
89-
ngx_int_t rc;
90-
ngx_chain_t *cl;
91-
u_char *err_msg;
92-
size_t len;
89+
ngx_int_t rc;
90+
ngx_chain_t *cl;
91+
u_char *err_msg;
92+
size_t len;
9393
#if (NGX_PCRE)
94-
ngx_pool_t *old_pool;
94+
ngx_pool_t *old_pool;
9595
#endif
9696
ngx_http_lua_ctx_t *ctx;
9797

src/ngx_http_lua_control.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,12 @@ ngx_http_lua_ffi_exit(ngx_http_request_t *r, int status, u_char *err,
488488
return NGX_ERROR;
489489
}
490490

491+
/* rc is useless in bodyfilter phase */
492+
if (ctx->context & NGX_HTTP_LUA_CONTEXT_BODY_FILTER) {
493+
ctx->body_exited = 1;
494+
return NGX_OK;
495+
}
496+
491497
if (ctx->context & (NGX_HTTP_LUA_CONTEXT_SSL_CERT
492498
| NGX_HTTP_LUA_CONTEXT_SSL_SESS_STORE
493499
| NGX_HTTP_LUA_CONTEXT_SSL_SESS_FETCH))
@@ -549,7 +555,6 @@ ngx_http_lua_ffi_exit(ngx_http_request_t *r, int status, u_char *err,
549555
"lua exit with code %i", ctx->exit_code);
550556

551557
if (ctx->context & (NGX_HTTP_LUA_CONTEXT_HEADER_FILTER
552-
| NGX_HTTP_LUA_CONTEXT_BODY_FILTER
553558
| NGX_HTTP_LUA_CONTEXT_BALANCER))
554559
{
555560
return NGX_DONE;

0 commit comments

Comments
 (0)