In my case I have a configuration like so inside location block access_by_lua_block { require("my-lua-module").doSomething() -- this returns a response and exits } Thus even if I have a block such as header_filter_by_lua_block { ngx.header.content_length = nil }, this code is never hit as there is an exit in the access_by_lua_block itself. Adding ngx.header.content_length = nil to the beginning of access_by_lua_block doesn't work either.
As a result the content-length header is seen in the response which leads to errors such as Excess found in a read: excess = 1, size = 31, maxdownload = 31, bytecount = 0 (seen when curl request is issued) Can someone please advise on how to overcome this? Thanks for your help.
李俊龙
unread,
Jun 23, 2021, 8:12:13 PM6/23/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openresty-en
remove content-length in header_filter_b_lua_block
Kshitij Joshi
unread,
Jun 27, 2021, 12:36:08 PM6/27/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message