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

Client should verify response content-type #250

Open
jhump opened this issue Apr 1, 2024 · 0 comments
Open

Client should verify response content-type #250

jhump opened this issue Apr 1, 2024 · 0 comments

Comments

@jhump
Copy link
Member

jhump commented Apr 1, 2024

Currently, the client assumes the response uses the correct content-type if it has a "200 OK" status code. To prevent strange issues in the face of misbehaving servers or middle-boxes, the client should actually verify the content-type.

If the content-type does not appear to be a valid RPC response (i.e. incorrect prefix), it should consider it an unknown error. If the content-type does appear to be a valid RPC response (correct prefix) but indicates the wrong codec (i.e. different than the request codec), it should consider it an internal error (since this indicates an internal problem in the server implementation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant