You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/18 07:37:46 UTC

[GitHub] [apisix-java-plugin-runner] Hugo-X commented on issue #67: bug: [lua] init.lua:617: phase_func(): failed to receive RPC_HTTP_REQ_CALL: closed

Hugo-X commented on issue #67:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/67#issuecomment-922233784


   > 官方demo StopRequestDemoFilter 请求503,没有正常响应,版本2.9 插件版本0.1
   
   Both  APISIX 2.7 and 2.9 can work fine.
   
   A simple modification of the StopRequestDemoFilter.java is needed,  to avoid the **NumberFormatException** or **ClassCastException**
   
   You can try this patch out
   https://github.com/Hugo-X/apisix-java-plugin-runner/commit/6eca8cd6710b689dae09b89c5eb4462724be1f21
   
   ```
   "ext-plugin-pre-req": {
               "conf": [{
                   "name": "StopRequestDemoFilter",
                   "value": "{\"stop_response_code\": 200, \"stop_response_header_name\": \"header_java_runner\", \"stop_response_header_value\": \"via-java-runner\",  \"stop_response_body\": \"hellox\"}"
               }]
           }
   ```
   
   ```
   "ext-plugin-pre-req": {
               "conf": [{
                   "name": "StopRequestDemoFilter",
                   "value": "{\"stop_response_code\": "200", \"stop_response_header_name\": \"header_java_runner\", \"stop_response_header_value\": \"via-java-runner\",  \"stop_response_body\": \"hellox\"}"
               }]
           }
   ```
   
   
   ![image](https://user-images.githubusercontent.com/11963765/133880035-ffb384d6-3f76-4ddf-a60c-4785d948e54f.png)
   


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