Current Behavior
The response from grpc server has a trailing header but APISIX grpcweb plugin truncates it and causes client error.


The related code of grpc-dotnet could be checked here:
https://github.com/grpc/grpc-dotnet/blob/46480fca2fccddb3391cf267004f281afe87571d/src/Grpc.Net.Client/Internal/GrpcProtocolHelpers.cs#L386

Expected Behavior
Trailing headers could be reserved for client.
Error Logs
No response
Steps to Reproduce
- run APISIX via docker compose
- setup upstream grpcweb api
- config route
{
"uri": "/*",
"name": "grpcweb",
"plugins": {
"cors": {},
"grpc-web": {}
},
"upstream_id": "479432631159620291",
"status": 1
}
- curl
curl http://localhost:9080/xxxxxxxxx -X OPTIONS -v
Environment
- APISIX version (run
apisix version): 3.5.0
- Operating system (run
uname -a):
Linux 49c5eb4d90cd 5.15.49-linuxkit-pr #1 SMP PREEMPT Thu May 25 07:27:39 UTC 2023 aarch64 GNU/Linux
-
OpenResty / Nginx version (run openresty -V or nginx -V):
nginx version: openresty/1.21.4.1
built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
built with OpenSSL 1.1.1s 1 Nov 2022
TLS SNI support enabled
-
etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
-
APISIX Dashboard version, if relevant:
-
Plugin runner version, for issues related to plugin runners:
-
LuaRocks version, for installation issues (run luarocks --version):
Current Behavior
The response from grpc server has a trailing header but APISIX grpcweb plugin truncates it and causes client error.
The related code of grpc-dotnet could be checked here:

https://github.com/grpc/grpc-dotnet/blob/46480fca2fccddb3391cf267004f281afe87571d/src/Grpc.Net.Client/Internal/GrpcProtocolHelpers.cs#L386
Expected Behavior
Trailing headers could be reserved for client.
Error Logs
No response
Steps to Reproduce
{ "uri": "/*", "name": "grpcweb", "plugins": { "cors": {}, "grpc-web": {} }, "upstream_id": "479432631159620291", "status": 1 }Environment
apisix version): 3.5.0uname -a):Linux 49c5eb4d90cd 5.15.49-linuxkit-pr #1 SMP PREEMPT Thu May 25 07:27:39 UTC 2023 aarch64 GNU/Linux
OpenResty / Nginx version (run
openresty -Vornginx -V):nginx version: openresty/1.21.4.1
built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
built with OpenSSL 1.1.1s 1 Nov 2022
TLS SNI support enabled
etcd version, if relevant (run
curl http://127.0.0.1:9090/v1/server_info):APISIX Dashboard version, if relevant:
Plugin runner version, for issues related to plugin runners:
LuaRocks version, for installation issues (run
luarocks --version):