You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "Guohao1020 (via GitHub)" <gi...@apache.org> on 2023/12/06 05:50:07 UTC

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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org