AstarLight commented on code in PR #9312:
URL: https://github.com/apache/apisix/pull/9312#discussion_r1169653930


##########
apisix/cli/ngx_tpl.lua:
##########
@@ -766,6 +766,7 @@ http {
             grpc_set_header   "Host" $upstream_host;
             {% end %}
             grpc_set_header   Content-Type application/grpc;
+            grpc_set_header   Te trailers;

Review Comment:
   Thanks for disscussing.
   grpc client hard-code set TE header.
   golang grpc client:  
https://github.com/grpc/grpc-go/blob/master/internal/transport/http2_client.go#L528
   C/C++ grpc client:  
https://github.com/grpc/grpc/blob/master/src/core/ext/filters/http/client/http_client_filter.cc#L118
   
   grpc requires te header in their spec: 
https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md, which is may 
different from your reference.
   
   I believe that every grpc client should hard-code set te header.
   
   So if you use golang grpc client to request python grpc server, it will be 
success. 
   But you use Apisix to request python grpc server, it will fail.
   



-- 
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]

Reply via email to