Hi team, We are adopting `grpc` and have hit a mig...
# kotlinx-rpc
m
Hi team, We are adopting
grpc
and have hit a migration blocker with gRPC metadata serialization for composite headers like
User-Agent
. Even when we explicitly set a header value without spaces (e.g.,
Android=36;Version=26.23.0
), the
grpc
client automatically injects a space after each semicolon upon sending (
Android=36; Version=26.23.0
). While RFC 9110 permits Optional White Space, this automatic injection breaks compatibility. Our existing Java, Swift, Go and JS clients do not add these spaces, and hundreds of our backend microservices rely on strict string splitting without trimming. Updating parsing logic across our entire backend architecture to handle this new whitespace is a major effort. Could you either remove this automatic space injection to align with other gRPC platform implementations, or expose an API to disable this formatting? This would maintain backward compatibility and unblock our migration.
a
Hi! Is this happening on Android?
m
I only got this verified for android, but i think it happens also on iOS.
a
Alright, I'll what's the problem migth be
m
After investigating further, the root cause is different than I initially reported. The grpc client is actually overriding the
User-Agent
header we set via our interceptor. As far as I can tell, there is currently no API to customize or append to the header value. I have temporarily unblocked our setup by forking the repository and adding this capability. While making that change, I also removed the configuration that excludes iOS as a server target. Running the gRPC server on
localhost
directly on an iOS device works perfectly for our local mock server setup. Since the iOS server target is a somewhat niche use case, I wanted to check your stance. Would you be open to a Pull Request for either the
User-Agent
configuration API or enabling the iOS server target?
🔥 1
a
Sure! We are open for both
m