|
| 1 | +diff --git src/ngx_http_lua_bodyfilterby.c src/ngx_http_lua_bodyfilterby.c |
| 2 | +index 632f5afe..a8a382ac 100644 |
| 3 | +--- src/ngx_http_lua_bodyfilterby.c |
| 4 | ++++ src/ngx_http_lua_bodyfilterby.c |
| 5 | +@@ -299,7 +299,7 @@ ngx_http_lua_body_filter(ngx_http_request_t *r, ngx_chain_t *in) |
| 6 | + out = NULL; |
| 7 | + ngx_chain_update_chains(r->pool, |
| 8 | + &ctx->free_bufs, &ctx->filter_busy_bufs, &out, |
| 9 | +- (ngx_buf_tag_t) &ngx_http_lua_module); |
| 10 | ++ (ngx_buf_tag_t) &ngx_http_lua_body_filter); |
| 11 | + if (rc != NGX_OK |
| 12 | + && ctx->filter_busy_bufs != NULL |
| 13 | + && (r->connection->buffered |
| 14 | +@@ -378,7 +378,7 @@ ngx_http_lua_body_filter(ngx_http_request_t *r, ngx_chain_t *in) |
| 15 | + |
| 16 | + ngx_chain_update_chains(r->pool, |
| 17 | + &ctx->free_bufs, &ctx->filter_busy_bufs, &out, |
| 18 | +- (ngx_buf_tag_t) &ngx_http_lua_module); |
| 19 | ++ (ngx_buf_tag_t) &ngx_http_lua_body_filter); |
| 20 | + |
| 21 | + return rc; |
| 22 | + } |
| 23 | +@@ -657,6 +657,7 @@ ngx_http_lua_body_filter_param_set(lua_State *L, ngx_http_request_t *r, |
| 24 | + return luaL_error(L, "no memory"); |
| 25 | + } |
| 26 | + |
| 27 | ++ cl->buf->tag = (ngx_buf_tag_t) &ngx_http_lua_body_filter; |
| 28 | + if (type == LUA_TTABLE) { |
| 29 | + cl->buf->last = ngx_http_lua_copy_str_in_table(L, 3, cl->buf->last); |
| 30 | + |
| 31 | +@@ -674,6 +675,8 @@ done: |
| 32 | + if (cl == NULL) { |
| 33 | + return luaL_error(L, "no memory"); |
| 34 | + } |
| 35 | ++ |
| 36 | ++ cl->buf->tag = (ngx_buf_tag_t) &ngx_http_lua_body_filter; |
| 37 | + } |
| 38 | + |
| 39 | + if (last) { |
0 commit comments