withoutaname commented on issue #1207:
URL: https://github.com/apache/incubator-brpc/issues/1207#issuecomment-674054580
这个方法我试过了,调用如下
brpc::Controller* cntl = static_cast<brpc::Controller*>(rpcCntl);
cntl->SetFailed(6, "Already exists");
抓包结果如下
HyperText Transfer Protocol 2
Stream: HEADERS, Stream ID: 1, Length 19, 200 OK
Length: 19
Type: HEADERS (1)
Flags: 0x04
0... .... .... .... .... .... .... .... = Reserved: 0x0
.000 0000 0000 0000 0000 0000 0000 0001 = Stream Identifier: 1
[Pad Length: 0]
Header Block Fragment: 885f106170706c69636174696f6e2f67727063
[Header Length: 54]
[Header Count: 2]
Header: :status: 200 OK
Header: content-type: application/grpc
Stream: DATA, Stream ID: 1, Length 5
Stream: HEADERS, Stream ID: 1, Length 102
Length: 102
Type: HEADERS (1)
Flags: 0x05
0... .... .... .... .... .... .... .... = Reserved: 0x0
.000 0000 0000 0000 0000 0000 0000 0001 = Stream Identifier: 1
[Pad Length: 0]
Header Block Fragment:
400b677270632d737461747573023133400c677270632d6d…
[Header Length: 112]
[Header Count: 2]
Header: grpc-status: 13
Header: grpc-message:
%5b%31%37%32.%31%37.%30.%32%3a%38%30%38%30%5d%5bE%36%5dAlready%20exists
Stream: WINDOW_UPDATE, Stream ID: 0, Length 4
预期的grpc-status是6但是结果是13,预期的grpc-message是Already
exists但是结果是%5b%31%37%32.%31%37.%30.%32%3a%38%30%38%30%5d%5bE%36%5dAlready%20exists
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]