caozhi6655 opened a new issue, #7298:
URL: https://github.com/apache/apisix/issues/7298
### Description
I use apisix for grpc proxy。I use a custom lua plugin to process the
request,when some request param not right,i return code like:
`
core.response.add_header("Content-Type", "application/grpc")
core.response.add_header("grpc-status", "16")
core.response.add_header("grpc-message",
"UNAUTHENTICATED")
core.response.add_header("test", "httt")
return 200
`
and I use a grpc tool "bloom-rpc" to debug the request,then the "bloom-rpc"
return like
` "error": "2 UNKNOWN: No status received"
`
and I tried golang client to debug,it returns err
`server closed the stream without sending trailers`。
I don't know why,and i debuged a whole day。。。
and when i set the status code 200 -> 599,it worked。。
so i what know why?
and another question,it works well in kong the code like that
`return kong.response.exit(200, nil, {
["Content-Type"] = "application/grpc",
["grpc-status"] = 16,
["grpc-message"] = "UNAUTHENTICATED"
})`
Hope the answer! Thanks very well!
### Environment
- APISIX version (run `apisix version`):2.13
- Operating system (run `uname -a`):centos os 7.9
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
- 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`):
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]