Skip to content

Commit

Permalink
Set Content-Length header in NodeHTTPTransport to use Raw Http encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelAquilina committed May 9, 2019
1 parent 6b027b1 commit 836c600
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/grpc-web-node-http-transport/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class NodeHttp implements grpc.Transport {
}

sendMessage(msgBytes: Uint8Array) {
this.request.setHeader("Content-Length", msgBytes.byteLength);
this.request.write(toBuffer(msgBytes));
this.request.end();
}
Expand Down

0 comments on commit 836c600

Please sign in to comment.