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

Servers base64-encode “grpc-status-details-bin” header with padding, but should be unpadded #2765

Open
jhump opened this issue May 30, 2024 · 1 comment

Comments

@jhump
Copy link
Member

jhump commented May 30, 2024

The spec for gRPC states that implementations should emit binary headers using unpadded base64-encoding (emphasis mine):

Note that HTTP2 does not allow arbitrary octet sequences for header values so binary header values must be encoded using Base64 as per https://tools.ietf.org/html/rfc4648#section-4. Implementations MUST accept padded and un-padded values and should emit un-padded values.

However, the server in this repo emits a “grpc-status-details-bin” header (a special binary header containing error details that accompany the gRPC status) that uses padding.

@murgatroid99
Copy link
Member

The library doesn't have full control over the details of the base64 encoding. It just calls Buffer#toString('base64').

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

No branches or pull requests

2 participants