Closed mraleph closed 2 years ago
Yes, per our understanding, grpc-status
should be mandatory.
But I'm not sure why exactly is the grpc-web code allows it to be empty. :)
Thanks @sampajano.
Resolving this as the current behaviour matches the intent.
It seems there is a discrepancy in how native protocol and gRPC-Web are handling
grpc-status
. This discrepancy does not seem to be documented in gRPC-Web spec here, but it becomes obvious when comparing implementations.Native gRPC protocol describes
grpc-status
as an always present:Implementations handle missing
grpc-status
as an error. See e.g. Java implementation.gRPC-Web protocol description does not mention any difference to native protocol with respect to status handling, but looking at the implementation we discover that it defaults status to OK if it is missing.
We have not observed such behaviour when testing with Envoy, but apparently there are servers out there which would omit OK status.
It's unclear whether server is compliant to gRPC-Web specificiation here or whether default implementation is simply lenient. @wenbozhu could you provide the guidance here?