Re: [DISCUSS] Introduce a way to get extra request information in the external plugin

2021-08-05 Thread ZhengSong Tu
agree +1 *ZhengSong Tu* My GitHub: https://github.com/tzssangglass Apache APISIX: https://github.com/apache/apisix Zexuan Luo 于2021年8月5日周四 上午9:43写道: > Yes. > The ExtraInfoReq already contains type and name (if needed). > > ZhengSong Tu 于2021年8月5日周四 上午9:36写道: > > >

Re: [DISCUSS] Introduce a way to get extra request information in the external plugin

2021-08-04 Thread Zexuan Luo
Yes. The ExtraInfoReq already contains type and name (if needed). ZhengSong Tu 于2021年8月5日周四 上午9:36写道: > > One more question: How does APISIX know which ExtraInfo the Runner > wants? Declare it in ExtraInfoReq? > > *ZhengSong Tu* > My GitHub: https://github.com/tzssangglass

Re: [DISCUSS] Introduce a way to get extra request information in the external plugin

2021-08-04 Thread ZhengSong Tu
One more question: How does APISIX know which ExtraInfo the Runner wants? Declare it in ExtraInfoReq? *ZhengSong Tu* My GitHub: https://github.com/tzssangglass Apache APISIX: https://github.com/apache/apisix Zexuan Luo 于2021年8月5日周四 上午9:01写道: > > 1. declare ExtraIn

Re: [DISCUSS] Introduce a way to get extra request information in the external plugin

2021-08-04 Thread Zexuan Luo
I already talked about this issue at the beginning. Let me repeat my word here: > Although handling a large body in the extern plugin is discourage, we > still need to way to adapt it instead of just raise an error. > Since body can't be zero in all known types, we can introduce an extension with

Re: [DISCUSS] Introduce a way to get extra request information in the external plugin

2021-08-04 Thread Zexuan Luo
> 1. declare ExtraInfo in conf I used to solve it with this. But this way is too cumbersome. It let me think about Java's check exception. You have to add a new exception handler when the function you called has changed. There will be the same with the ExtraInfo > Does this also include handling

Re: [DISCUSS] Introduce a way to get extra request information in the external plugin

2021-08-03 Thread Daming
First, I am considering whether we need to take cover the huge request body. In usually, that should upload scenario. And this scenario, it is not a good resolution that is handled by the ext-plugin. And then, do we need to consider about compatible? Haochao Zhuang @dmsolr > 2021年8月4日

Re: [DISCUSS] Introduce a way to get extra request information in the external plugin

2021-08-03 Thread ZhengSong Tu
> > APISIX sends HTTPReqCallReq > while reply from Runner isn't HTTPReqCallResp: > APISIX handle ExtraInfoReq I feel there is some ambiguity here. The reply from Runner to APISIX isn't HTTPReqCallResp = Runner wants ExtraInfo, so why not just tell APISIX that it wants ExtraInfo. Or a response

[DISCUSS] Introduce a way to get extra request information in the external plugin

2021-08-03 Thread Zexuan Luo
Sometimes we need to use some information that can't be predicted before running the extern plugin. For example, access the `ngx.var.request_start_time` in the extern plugin. Hence, we add a pair of messages: ExtraInfoReq & ExtraInfoResp. Now a request from APISIX to Plugin Runner will be like th