Skip to content

Comments

core: Warn when server doesn't advertise grpc-accept-encoding#12622

Open
ani0x53 wants to merge 1 commit intogrpc:masterfrom
ani0x53:fix/warn-missing-accept-encoding
Open

core: Warn when server doesn't advertise grpc-accept-encoding#12622
ani0x53 wants to merge 1 commit intogrpc:masterfrom
ani0x53:fix/warn-missing-accept-encoding

Conversation

@ani0x53
Copy link

@ani0x53 ani0x53 commented Jan 23, 2026

When the client sends compressed messages (grpc-encoding header set), but the server's response headers don't include grpc-accept-encoding, log a FINE-level warning. This helps diagnose compression compatibility issues between client and server.

The warning is at FINE level to avoid disrupting existing systems while providing useful diagnostic information when needed.

Fixes #1804

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 23, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: anirudh83 / name: Anirudh Bhatnagar (50e29b3)

@ani0x53 ani0x53 force-pushed the fix/warn-missing-accept-encoding branch from 9841dec to dcbd4aa Compare January 23, 2026 18:09
When the client sends compressed messages (grpc-encoding header set),
but the server's response headers don't include grpc-accept-encoding,
log a FINE-level warning. This helps diagnose compression compatibility
issues between client and server.

The warning is at FINE level to avoid disrupting existing systems while
providing useful diagnostic information when needed.

Fixes grpc#1804

Signed-off-by: anirudh83 <anirudh.bh@gmail.com>
@ani0x53 ani0x53 force-pushed the fix/warn-missing-accept-encoding branch from dcbd4aa to 50e29b3 Compare January 23, 2026 18:30
*
* @param messageEncoding the encoding name (e.g., "gzip"), or null for identity
*/
protected void setSentMessageEncoding(@Nullable String messageEncoding) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of calling this directly from the unit test, make this private and add an overload constructor for BaseAbstractClientStream that takes a Metadata argument for headers to send. The currently used overload passes empty Metadata.

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

Successfully merging this pull request may close these issues.

Verify server sends grpc-accept-encoding appropriately

2 participants