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

[GitHub] [apisix-java-plugin-runner] frankqoqo8 commented on issue #235: bug:在PluginFilter类中通过requiredRespBody()方法设置为true后,在插件中调用PostRequest.getUpstreamStatusCode()方法会偶现(概率很高)获取到不正确的响应码

frankqoqo8 commented on issue #235:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/235#issuecomment-1715330494

   修正一下PostRequest的构造函数就行可以了:
   public PostRequest(Req req) {
           this.req = req;
           this.status = req.status();
           headers = new HashMap<>();
           for (int i = 0; i < req.headersLength(); i++) {
               TextEntry header = req.headers(i);
               headers.put(header.name(), header.value());
           }
       }


-- 
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