line/lich

The content type of thrift packet should never be hard-coded

powdream opened this issue · 0 comments

On the latest snapshot of lich-thrift at this moment, in ThriftRequestBody, the content type of the request message is hard-coded like:, in ThriftRequestBody, the content type of the request message is hard-coded like:

private val mediaTypeThrift: MediaType = "application/x-thrift".toMediaType()

However, according to the Armeria document and the armeria API server's actual behavior,
application/x-thrift uses the TBINARY format as its protocol. And, if the protocol is changed, the content type of the request message should be changed as well according to the message's actual protocol.