Skip to content

Commit

Permalink
Fix response header value with colon
Browse files Browse the repository at this point in the history
  • Loading branch information
stanley-cheung committed Nov 10, 2018
1 parent f28d6cb commit def314a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions javascript/net/grpc/web/grpcwebclientreadablestream.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ const GrpcWebClientReadableStream = function(genericTransportInterface) {
}
var responseHeaders = self.xhr_.getResponseHeaders();
if (GRPC_STATUS in responseHeaders &&
responseHeaders[GRPC_STATUS] != StatusCode.OK) {
Number(self.xhr_.getResponseHeader(GRPC_STATUS)) != StatusCode.OK) {
self.onErrorCallback_({
code: Number(responseHeaders[GRPC_STATUS]),
message: responseHeaders[GRPC_STATUS_MESSAGE]
code: Number(self.xhr_.getResponseHeader(GRPC_STATUS)),
message: self.xhr_.getResponseHeader(GRPC_STATUS_MESSAGE)
});
}
});
Expand Down

0 comments on commit def314a

Please sign in to comment.