Open PierrickVoulet opened 2 years ago
FYI @fiboknacky @aohren
I believe it was discussed and agreed that it was ok, as headers are case-insensitive according to http spec. @noahdietz I guess it works as intended, doesn't it?
Right HTTP spec says headers are case insensitive but in gRPC, I believe the implementation forces metadata keys to be lowercase.
I don't particularly like forcing one transport to behave like another because there is a dependency on emergent behavior. However, it does make it hard for clients to normalize keys before accessing them.
@bshaffer WDYT about forcing REST header keys to lowercase?
Unless there's an actual error or implementation issue that I'm missing, I'd prefer to call this WAD
Is it possible to preserve the casing that came over the wire? While sure case-insensitivity conforms to the spec, it would be a lot more useful for client libraries / users if this lib didn't destroy the original case. This artificially limits what it can be used for. Say you were trying to use the client library in a network level debugging tool (to find issues literally related to, say, header casing on one of your servers). Then you couldn't use this library to debug that problem if the library itself is also mangling the casing.
If this were a higher level library, this wouldn't be as important and I'd agree conforming to a spec is good enough. But since this is client library plumbing, it's not unreasonable to think users could try to use it to debug their own networking issues. Why preclude that use case by re-writing the casing in gax?
Environment details
Steps to reproduce
Using the
google-ads-php
library:Request-Id
with REST andrequest-id
with gRPC.Could you confirm if this works as intended? Due to this difference in behavior between the two transports we had to add some complexity in our client library which is not optimal.