cronet: Delete TODO for User-Agent on CronetEngine

gRPC doesn't create the CronetEngine, so even though streaming is
observing the CronetEngine's User-Agent, we don't have control of that.
In addition, CronetEngines are commonly shared between gRPC and normal
HTTP traffic, so we don't actually expect users to set gRPC in engine's
user agent. The existing behavior seems to be working as well as
feasible.

Fixes #11582
This commit is contained in:
Sangamesh 2025-05-27 17:52:47 +00:00 committed by GitHub
parent d124007ff4
commit 83538cdae3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 1 deletions

View File

@ -362,7 +362,6 @@ class CronetClientStream extends AbstractClientStream {
private void setGrpcHeaders(BidirectionalStream.Builder builder) {
// Psuedo-headers are set by cronet.
// All non-pseudo headers must come after pseudo headers.
// TODO(ericgribkoff): remove this and set it on CronetEngine after crbug.com/588204 gets fixed.
builder.addHeader(USER_AGENT_KEY.name(), userAgent);
builder.addHeader(CONTENT_TYPE_KEY.name(), GrpcUtil.CONTENT_TYPE_GRPC);
builder.addHeader("te", GrpcUtil.TE_TRAILERS);