MekelCon commented on PR #8587: URL: https://github.com/apache/apisix/pull/8587#issuecomment-1372033540
> > @spacewander I saw the CI failed due to this line, 121 : `local accept_header = core_request.header(ctx, "Accept")` Because `ctx` is 'not defined' Wich is true, but it works, i am a beginner in .lua so maybe there is something i am missing. > > To have the correct syntax should we add the `ctx `parameter to the method resp_exit ? > > I think a bit it seems that there is no better way to do it. It's OK to add the parameter. @spacewander , so i checked quickly, i see at least 93 call to `response.exit(.......)` SO before doing the update i want to be sure of what need to done. As today we use this function with this definition : `function resp_exit(code, ...)` i must update it to : `function resp_exit(ctx, code, ...)` And then it means check all the usage to add the parameter ? For example `return core.response.exit(502)` will become `return core.response.exit(ctx, 502)` -- 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]
