connectrpc / connect-go

The Go implementation of Connect: Protobuf RPC that works.
https://connectrpc.com
Apache License 2.0
2.76k stars 91 forks source link

Client should verify response content-type #679

Closed jhump closed 5 months ago

jhump commented 5 months ago

@smaye81 found some more bugs with new conformance test cases.

The client is not verifying that the response has the correct content-type. So this change adds that verification.

Some tests, that had simple handlers that weren't setting a valid content-type, had to be updated. Sorry for the large diff stats, but it's not as bad as it looks. This PR adds three new table-driven tests that account for 75% of the lines of code.