-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
Hi All,
I am trying to let a Go client talk to C++ server on the very simple "greeting" example. I got
-
Go server talks to Go client
-
C++ server talks to C++ client
-
Go server talks to C++ client
But, C++ server does not talk to Go client : (
It seems that there is something weird about the request, in particular the "grpc-encoding" section.
Go:
D0312 12:48:55.811738475 9876 tcp_posix.c:173] READ 0x7f65a8000b30 (peer=ipv4:127.0.0.1:53510): 50 52 49 20 2a 20 48 54 54 50 2f 32 2e 30 0d 0a 0d 0a 53 4d 0d 0a 0d 0a 00 00 00 04 00 00 00 00 00 00 00 04 08 00 00 00 00 00 00 0e ff f1 00 00 44 01 04 00 00 00 01 83 86 44 96 62 6b 0a 54 9a a9 97 c5 61 4a 93 55 36 e2 d9 dc c4 2b 18 ac 29 53 41 86 a0 e4 1d 13 9d 09 5f 8b 1d 75 d0 62 0d 26 3d 4c 4d 65 64 7a 88 9a ca c8 b4 c7 60 2b 83 40 02 74 65 86 4d 83 35 05 b1 1f 00 00 13 00 01 00 00 00 01 00 00 00 00 0e 0a 0c 53 61 6e 74 61 20 42 61 62 61 72 61 00 00 00 04 01 00 00 00 00 'PRI * HTTP/2.0....SM............................D........D.bk.T....aJ.U6....+..)SA......._..u.b.&=LMedz......`[email protected] Babara.........'
I0312 12:48:55.811819310 9876 parsing.c:659] HTTP:1:HDR:SVR: :method: POST
I0312 12:48:55.811827855 9876 parsing.c:659] HTTP:1:HDR:SVR: :scheme: http
I0312 12:48:55.811836226 9876 parsing.c:659] HTTP:1:HDR:SVR: :path: /greeting.GreetingService/Greet
I0312 12:48:55.811846319 9876 parsing.c:659] HTTP:1:HDR:SVR: :authority: localhost
I0312 12:48:55.811850169 9876 parsing.c:659] HTTP:1:HDR:SVR: content-type: application/grpc
I0312 12:48:55.811857770 9876 parsing.c:659] HTTP:1:HDR:SVR: user-agent: grpc-go/1.0
I0312 12:48:55.811862711 9876 parsing.c:659] HTTP:1:HDR:SVR: te: trailers
C++
D0312 12:49:09.274579174 9877 tcp_posix.c:173] READ 0x7f65a0000c20 (peer=ipv4:127.0.0.1:53514): 50 52 49 20 2a 20 48 54 54 50 2f 32 2e 30 0d 0a 0d 0a 53 4d 0d 0a 0d 0a 00 00 18 04 00 00 00 00 00 00 02 00 00 00 00 00 03 00 00 00 00 00 04 00 00 ff ff 00 06 00 00 40 00 00 00 04 08 00 00 00 00 00 00 0f 00 01 00 01 10 01 04 00 00 00 01 40 07 3a 73 63 68 65 6d 65 04 68 74 74 70 40 07 3a 6d 65 74 68 6f 64 04 50 4f 53 54 40 05 3a 70 61 74 68 1f 2f 67 72 65 65 74 69 6e 67 2e 47 72 65 65 74 69 6e 67 53 65 72 76 69 63 65 2f 47 72 65 65 74 40 0a 3a 61 75 74 68 6f 72 69 74 79 0e 6c 6f 63 61 6c 68 6f 73 74 3a 38 30 38 30 40 0d 67 72 70 63 2d 65 6e 63 6f 64 69 6e 67 08 69 64 65 6e 74 69 74 79 40 14 67 72 70 63 2d 61 63 63 65 70 74 2d 65 6e 63 6f 64 69 6e 67 15 69 64 65 6e 74 69 74 79 2c 64 65 66 6c 61 74 65 2c 67 7a 69 70 40 02 74 65 08 74 72 61 69 6c 65 72 73 40 0c 63 6f 6e 74 65 6e 74 2d 74 79 70 65 10 61 70 70 6c 69 63 61 74 69 6f 6e 2f 67 72 70 63 40 0a 75 73 65 72 2d 61 67 65 6e 74 35 67 72 70 63 2d 63 2b 2b 2f 31 2e 30 2e 31 2d 70 72 65 31 20 67 72 70 63 2d 63 2f 31 2e 30 2e 31 2d 70 72 65 31 20 28 6c 69 6e 75 78 3b 20 63 68 74 74 70 32 29 00 00 04 08 00 00 00 00 01 00 00 ff ff 00 00 13 00 01 00 00 00 01 00 00 00 00 0e 0a 0c 53 61 6e 74 61 20 42 61 62 61 72 61 00 00 00 04 01 00 00 00 00 'PRI * HTTP/2.0....SM...................................@.......................@.:scheme.http@.:method.POST@.:path./greeting.GreetingService/Greet@.:authority.localhost:8080@[email protected],deflate,gzip@[email protected]/[email protected]++/1.0.1-pre1 grpc-c/1.0.1-pre1 (linux; chttp2).............................Santa Babara.........'
I0312 12:49:09.274692870 9877 parsing.c:659] HTTP:1:HDR:SVR: :scheme: http
I0312 12:49:09.274703976 9877 parsing.c:659] HTTP:1:HDR:SVR: :method: POST
I0312 12:49:09.274715408 9877 parsing.c:659] HTTP:1:HDR:SVR: :path: /greeting.GreetingService/Greet
I0312 12:49:09.274726492 9877 parsing.c:659] HTTP:1:HDR:SVR: :authority: localhost:8080
I0312 12:49:09.274734959 9877 parsing.c:659] HTTP:1:HDR:SVR: grpc-encoding: identity
I0312 12:49:09.274745969 9877 parsing.c:659] HTTP:1:HDR:SVR: grpc-accept-encoding: identity,deflate,gzip
I0312 12:49:09.274758047 9877 parsing.c:659] HTTP:1:HDR:SVR: te: trailers
I0312 12:49:09.274767995 9877 parsing.c:659] HTTP:1:HDR:SVR: content-type: application/grpc
I0312 12:49:09.274772813 9877 parsing.c:659] HTTP:1:HDR:SVR: user-agent: grpc-c++/1.0.1-pre1 grpc-c/1.0.1-pre1 (linux; chttp2)
Looks like the C++ client always send grpc-encoding and grpc-accept-encoding, while the Go client does not send these. I am not sure whether this is the cause of the problem.
Would any one please take a look?
Thanks