xref: /aosp_15_r20/external/grpc-grpc/doc/workarounds.md (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1*cc02d7e2SAndroid Build Coastguard Worker# gRPC Server Backward Compatibility Issues and Workarounds Management
2*cc02d7e2SAndroid Build Coastguard Worker
3*cc02d7e2SAndroid Build Coastguard Worker## Introduction
4*cc02d7e2SAndroid Build Coastguard WorkerThis document lists the workarounds implemented on gRPC servers for record and reference when users need to enable a certain workaround.
5*cc02d7e2SAndroid Build Coastguard Worker
6*cc02d7e2SAndroid Build Coastguard Worker## Workaround List
7*cc02d7e2SAndroid Build Coastguard Worker
8*cc02d7e2SAndroid Build Coastguard Worker### Cronet Compression
9*cc02d7e2SAndroid Build Coastguard Worker
10*cc02d7e2SAndroid Build Coastguard Worker**Workaround ID:** WORKAROUND\_ID\_CRONET\_COMPRESSION
11*cc02d7e2SAndroid Build Coastguard Worker
12*cc02d7e2SAndroid Build Coastguard Worker**Date added:** May 06, 2017
13*cc02d7e2SAndroid Build Coastguard Worker
14*cc02d7e2SAndroid Build Coastguard Worker**Status:** Implemented in C core and C++
15*cc02d7e2SAndroid Build Coastguard Worker
16*cc02d7e2SAndroid Build Coastguard Worker**Issue:** Before version v1.3.0-dev, gRPC iOS client's Cronet transport did not implement compression. However the clients still claim to support compression. As a result, a client fails to parse received message when the message is compressed.
17*cc02d7e2SAndroid Build Coastguard WorkerThe problem above was resolved in gRPC v1.3.0-dev. For backward compatibility, a server must forcingly disable compression for gRPC clients of version lower than or equal to v1.3.0-dev.
18*cc02d7e2SAndroid Build Coastguard Worker
19*cc02d7e2SAndroid Build Coastguard Worker**Workaround Description:** Implemented as a server channel filter in C core.  The filter identifies the version of peer client with incoming `user-agent` header of each call. If the client's gRPC version is lower that or equal to v1.3.x, a flag GRPC_WRITE_NO_COMPRESS is marked for all send_message ops which prevents compression of the messages to be sent out.
20