Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefer an implicit codec when using the gRPC default
Some gRPC servers in the wild appear to only accept requests when the Content-Type subtype codec name is empty, implying the default of "proto". For example Google Cloud API endpoints appear to require Content-Type to be exactly `application/grpc` and disallow the equivalent explicit form `application/grpc+proto`, rejecting requests using the latter form by responding with a 404 and `Content-Type: text/html`. It's unclear if this is a load balancer (mis)configuration issue, or a lack of support for specifying a codec in the server implementation, but the end result is the same. Seeing as the subtype qualifier is optional for gRPC, let's try to prefer the implicit form when it is equivalent to the selected codec. Note that this change only impacts gRPC. Elsewhere we continue to prefer being explicit. This change should not impact servers.
- Loading branch information