Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getStreamingResponseHeader errors when header not in Access-Control-Expose-Headers #574

Open
pnegahdar opened this issue Jun 4, 2019 · 1 comment

Comments

@pnegahdar
Copy link
Contributor

pnegahdar commented Jun 4, 2019

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 & improbable-eng/grpc-web#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.

@stanley-cheung
Copy link
Collaborator

@pnegahdar Sorry for being late to look into this.

I think what you said make sense, but how do I get into a situation where "the grpc-status is exposed in the payload (not header) per the spec"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants