Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conformance: client does not validate response content-type #749

Closed
jhump opened this issue May 28, 2024 · 1 comment
Closed

conformance: client does not validate response content-type #749

jhump opened this issue May 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jhump
Copy link
Member

jhump commented May 28, 2024

The client implementation only examines the response "content-type" header for the Connect unary protocol for non-200 HTTP status codes, to make sure it is "application/json". For other scenarios, it does not check that response header and will instead assume the content-type is correct begin consuming the response body.

This can lead to hard-to-debug errors with unexpected codes when the actual content is not parse-able per the expected message codec. In the worst case, it could possibly result in no error, if the content just happens to be parse-able. In that case, the response message is certain to be incorrect/invalid but it would be provided to application code without an error anyway.

Found by conformance tests in v1.14.0.

@jhump jhump added the bug Something isn't working label May 28, 2024
@jhump
Copy link
Member Author

jhump commented May 28, 2024

This bug was fixed by #679, and the fix was released in v1.15.0.

@jhump jhump closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant