getStreamingResponseHeader errors when header not in Access-Control-Expose-Headers
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 802
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 5
Description
https://github.com/grpc/grpc-web/blob/master/javascript/net/grpc/web/grpcwebclientreadablestream.js#L122
The invocations fail when the grpc-status is exposed in the payload (not header) per the spec. Since the `grpc-status` and `grpc-message` headers are no longer declared in the `Access-Control-Expose-Headers` header, accessing it from the Xhrio lib will give an error instead of returning `null`
These are related to the issues pointed out in #518 & https://github.com/improbable-eng/grpc-web/issues/396
Suggested fix: first see if `grpc-status` and `grpc-message` are in the `getResponseHeaders()` results before calling `getStreamingResponseHeader`.
I'd fix this if I had any idea how to build this project.
Contributor guide
Assessment
This issue has not been assessed yet.