Open LoganDark opened 2 years ago
ugh I'm just generally having issues whenever multiple phases are involved. i.e. calling ngx.exit
from access_by_lua_file
also causes invalid responses. ngx.exec
mostly works though
because the header has been sent out and there is no chance to change the HTTP status. So close the connection directly.
Relevant section of the OpenResty 1.19.9.1 config:
error.lua
:content.lua
:Trying to
curl https://localhost
results in:curl https://localhost --http1.1
(or--http1.0
):Commenting out the call to
ngx.send_headers()
results in the request completing successfully and printing500
.Using
echo
instead ofcontent_by_lua*
in the@error
named location doesn't solve the issue.