Skip to content

help request: core.response.exit will NOT interrupt the execution of the current request  #11823

@chenyyyang

Description

@chenyyyang

Description

https://github.com/openresty/lua-nginx-module?tab=readme-ov-file#ngxexit

When status >= 200 (i.e., ngx.HTTP_OK and above), it will interrupt the execution of the current request and return status code to Nginx.

According to this document,I tried
core.response.exit(200, "anything") on "Access" phase
and
core.response.exit(500, "anything")on "Access" phase

I check the logs and found that apisix will NOT interrupt the request . The "header_filter" ,"body_filter","log" phase will also be executed.

Environment

  • APISIX version (run apisix version): 2.15
  • Operating system (run uname -a): ubuntu (WSL)
    resty 0.28
    nginx version: openresty/1.21.4.1
    built with OpenSSL 1.1.1n 15 Mar 2022

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions