Allow specifying charset in the content-type header
Some HTTP clients always append charset to the content-type header e.g., content-type: application/json; charset=utf8. Requests made by those clients are rejected because of the content-type mismatch.
Twirp only allows the content-type header exactly matches one of aplication/json, application/json; strict=true or application/probobuf. This seems too strict, can we relax this constraint?
Thank you.
We are trying to send the application/grpc header. We override some parts of the code but, why is so strict, and do you know about the difference? Server is external server, so we can not see the server side :(
We are trying to send the
application/grpcheader. We override some parts of the code but, why is so strict, and do you know about the difference? Server is external server, so we can not see the server side :(
We changed following part;
module Twirp
module Encoding
JSON = "application/json"
# An opt-in content type useful when curling or manually testing a twirp
# service. This will fail if unknown fields are encountered. The return
# content type will be application/json.
JSON_STRICT = "application/json; strict=true"
# PROTO = "application/protobuf"
PROTO = "application/grpc"
But when we try to read response from the server it is empty