zuiyangqingzhou commented on issue #4905:
URL: https://github.com/apache/apisix/issues/4905#issuecomment-906875075


   got it, but I think it would be better to change the code below like this
   ```
   server {
           server_name 127.0.0.1; #
           listen 6688;
   
           location / {
               access_by_lua_block {
                   ngx.log(ngx.ERR, "run access block")
                   ngx.say("AAA")
               }
               content_by_lua_block {
                   ngx.log(ngx.ERR, "run content block")
                   ngx.say("BBB")
               }
               body_filter_by_lua_block {
                   ngx.log(ngx.ERR, "run body filter")
                   local chunk, eof = ngx.arg[1], ngx.arg[2]
                   # todo merge response
                   if eof then
                       ngx.arg[1] = "CCC"
                       ngx.arg[2] = true
                   end
               }
           }
       }
   ```
   what do you think? @spacewander 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to