apache / apache/apisix-java-plugin-runner

bug: 在PluginFilter类中通过requiredRespBody()方法设置为true后,在插件中调用PostRequest..getUpstreamHeaders()方法会偶现(概率很高)报错java.lang.IndexOutOfBoundsException: null

未關閉
#234 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Java
星號
152
分支
102
PR 合併指標
30 天內沒有已合併 PR

描述

### Issue description
在PluginFilter类中通过requiredRespBody()方法设置为true后,在插件中调用PostRequest..getUpstreamHeaders()方法会偶现(概率很高)报错java.lang.IndexOutOfBoundsException: null
### Environment

- apisix-java-plugin-runner 0.4.0
- apisix 3.2.0
- apisix-dashboard 3.0.0

### Minimal test code / Steps to reproduce the issue

1.通过apisix-dashboard创建路由使用ext-plugin-post-resp插件
![image](https://user-images.githubusercontent.com/37164104/231642198-9f688e24-ba24-43b1-a8a6-e5f1f8e3d981.png)
2.写一个简单的java测试插件,并且设置requiredRespBody()和requiredBody()都为true
![image](https://user-images.githubusercontent.com/37164104/231642358-33c5e33d-34bf-4ed6-bdd0-170229381dfa.png)
3.多次调用会发现很大概率会报错503
![image](https://user-images.githubusercontent.com/37164104/231642516-986aceec-5373-4a57-af8c-2dc11b1dad7f.png)
4.查看日志发现是getUpstreamHeaders()方法报错java.lang.IndexOutOfBoundsException: null
![image](https://user-images.githubusercontent.com/37164104/231642737-4ed0d39b-f241-433b-b7e4-887ab92442cf.png)

### What's the actual result? (including assertion message & call stack if applicable)

### What's the expected result?

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。