We have a use case in which we buffer locally part of each body chunk and send it later, together with the following chunk. On the last chunk, we send the remaining part of previous chunk together with the whole last chunk. We do that by modifying buffer using setBuffer function.
This works fine unless the request includes trailers. In such case, last chunk is received in last invocation of onRequestBody, but there is no way to know that this is a last chunk as end_stream == false. And in onRequest/ResponseTrailers setting buffer is not possible (returns BadArgument).
We have a use case in which we buffer locally part of each body chunk and send it later, together with the following chunk. On the last chunk, we send the remaining part of previous chunk together with the whole last chunk. We do that by modifying buffer using setBuffer function.
This works fine unless the request includes trailers. In such case, last chunk is received in last invocation of onRequestBody, but there is no way to know that this is a last chunk as end_stream == false. And in onRequest/ResponseTrailers setting buffer is not possible (returns BadArgument).