kenshinxf commented on issue #685: Thrift protocol中序列化的请求时,writeStructBegin 和 
writeFieldBegin中的服务名和请求的名是固定的。无法定制
URL: https://github.com/apache/incubator-brpc/issues/685#issuecomment-472354485
 
 
   > **Describe the bug (描述bug)**
   > [如题:]
   > 
   > thrift_protocol.cpp的SerializeThriftRequest函数中
   > 
   > ```
   >         char struct_begin_str[32 + method_name.size()];
   >         char* p = struct_begin_str;
   >         memcpy(p, "ThriftService_", 14);  // 这里的service name写死了 
ThriftService
   >         p += 14;
   >         memcpy(p, method_name.data(), method_name.size());
   >         p += method_name.size();
   >         memcpy(p, "_pargs", 6);
   >         p += 6;
   >         *p = '\0';
   >         xfer += oprot.writeStructBegin(struct_begin_str);
   >         xfer += oprot.writeFieldBegin("request", 
::apache::thrift::protocol::T_STRUCT, 
   >                                                         
THRIFT_REQUEST_FID);  // 这里的请求名称写死了 “request”
   > ```
   > **Expected behavior (期望行为)**
   > 由用户定制。
   
   想问一下, 这里用户定制的场景和目的是? 现在不能定制的影响是?如有有影响能提供个bad case例子吗?

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to