cwy57885142 opened a new issue #3425:
URL: https://github.com/apache/apisix/issues/3425


   ### Issue description
   grpc-transcode插件采用命令行创建响应200,采用dashboard创建抛异常:curl: (52) Empty reply from 
server
   ### Environment
   
   * apisix version (cmd: `apisix version`):2.2
   * OS: (cmd: `uname -a`):centos6.10
   * OpenResty / Nginx version: (cmd: `nginx -V` or `openresty -V`)
   
   ### Minimal test code / Steps to reproduce the issue
   1.采用命令行创建插件
   Add a proto:
   curl http://admin.test.com/apisix/admin/proto/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "content" : "syntax = \"proto3\";
       package helloworld;
       service Greeter {
           rpc SayHello (HelloRequest) returns (HelloReply) {}
       }
       message HelloRequest {
           string name = 1;
       }
       message HelloReply {
           string message = 1;
       }"
   }'
   
   Add a routes:
   curl http://admin.test.com/apisix/admin/routes/111 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "methods": ["GET"],
       "uri": "/test",
       "service_protocol": "grpc",
       "plugins": {
           "grpc-transcode": {
            "proto_id": "1",
            "service": "helloworld.Greeter",
            "method": "SayHello"
           }
       },
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "172.20.11.32:50051": 1
           }
       }
   }'
   
   Test Plugin:
   curl -i http://admin.test.com/test?name=world
   
   HTTP/1.1 200 OK
   Date: Tue, 26 Jan 2021 06:49:07 GMT
   Content-Type: application/json
   Transfer-Encoding: chunked
   Connection: keep-alive
   grpc-encoding: identity
   grpc-accept-encoding: gzip
   Server: APISIX/2.2
   Trailer: grpc-status
   Trailer: grpc-message
   {"message":"Hello world !"}
   
   
   2.Dashboard创建插件不加"content"
   
   Data Editor:
   {
     "deadline": 0,
     "disable": false,
     "method": "SayHello",
     "proto_id": "1",
     "service": "helloworld.Greeter"
   }
   
   Test Plugin:
   curl -i http://admin.test.com/test?name=world
   
   curl: (52) Empty reply from server
   
   3.Dashboard创建插件加"content":
   Data Editor:
   {
     "content": "syntax = \"proto3\";package helloworld;service Greeter {rpc 
SayHello (HelloRequest) returns (HelloReply) {}}message HelloRequest {string 
name = 1;}message HelloReply {string message = 1;}",
     "deadline": 0,
     "disable": false,
     "method": "SayHello",
     "proto_id": "1",
     "service": "helloworld.Greeter"
   }
   
   Test Plugin:
   curl -i http://admin.test.com/test?name=world
   
   curl: (52) Empty reply from server
   
   ### What's the actual result? (including assertion message & call stack if 
applicable)
   
   ### What's the expected result?
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to