Re: [I] bug: API disabled in the context of body_filter_by_lua* [apisix]
nic-6443 closed issue #10069: bug: API disabled in the context of body_filter_by_lua* URL: https://github.com/apache/apisix/issues/10069 -- 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]
Re: [I] bug: API disabled in the context of body_filter_by_lua* [apisix]
nic-6443 commented on issue #10069: URL: https://github.com/apache/apisix/issues/10069#issuecomment-467689 This turned out to be a bug in lua-nginx-module itself rather than in the APISIX plugin code, and it's fixed in current releases. ext-plugin-post-resp streams the upstream response with ngx.print/ngx.flush from the access phase; when the response is large enough that output backs up, the pending-output flush re-enters the body filter with a NULL chain, and `ngx_http_lua_body_filter` failed to restore its phase context — so the next ngx.print aborted with "API disabled in the context of body_filter_by_lua*" and the response got truncated. That's why only large (~100KB+) bodies were affected, and why `response.setBody(request.getBody())` happened to dodge it. It was reported upstream as openresty/lua-nginx-module#2410 and fixed in #2411; APISIX picked it up via the apisix-nginx-module patch (api7/apisix-nginx-module#104), which is in apisix-runtime 1.3.1+, i.e. official builds of APISIX 3.13.0 and later. Upgrading to >= 3.13.0 should make the workaround unnecessary, so I think this one can be closed. -- 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]
Re: [I] bug: API disabled in the context of body_filter_by_lua* [apisix]
xuruidong commented on issue #10069: URL: https://github.com/apache/apisix/issues/10069#issuecomment-3466341177 https://github.com/openresty/lua-nginx-module/pull/2411 -- 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]
Re: [I] bug: API disabled in the context of body_filter_by_lua* [apisix]
missence521 commented on issue #10069: URL: https://github.com/apache/apisix/issues/10069#issuecomment-2990512237 Has this problem been solved? How to deal with it -- 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]
Re: [I] bug: API disabled in the context of body_filter_by_lua* [apisix]
Guohao1020 commented on issue #10069: URL: https://github.com/apache/apisix/issues/10069#issuecomment-1842131807 > > send_chunk > > @Guohao1020 This solution just overrides the original upstream response with request body. Was that your intended use case? So basically you solved the issue by changing the upstream response? -- 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]
Re: [I] bug: API disabled in the context of body_filter_by_lua* [apisix]
Guohao1020 closed issue #10069: bug: API disabled in the context of body_filter_by_lua* URL: https://github.com/apache/apisix/issues/10069 -- 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]
Re: [I] bug: API disabled in the context of body_filter_by_lua* [apisix]
Guohao1020 commented on issue #10069: URL: https://github.com/apache/apisix/issues/10069#issuecomment-1842131403 In the Java plug-in, `request.getbody ()` is not the request body, but the upstream response body. If the ext-plugin-post-resp plug-in is enabled, the plug-in must explicitly call the `response.setbody (request.getbody ())` method. Even if the plug-in callback method does nothing, it must call the `response.setbody (request.getbody ())` method. Of course, if not set, the plug-in will also return an upstream response to the Apisix gateway, but the request response body will be truncated. My solution is that the request response body of the plug-in must be set when the plug-in does not do anything. If the method is not manually overridden, the request response body is truncated. -- 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]
Re: [I] bug: API disabled in the context of body_filter_by_lua* [apisix]
zhl11b commented on issue #10069: URL: https://github.com/apache/apisix/issues/10069#issuecomment-1801549973 golang has same problem -- 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]
