@improbable-eng/grpc-web-node-http-transport
Advanced tools
Comparing version 0.9.6 to 0.10.0
@@ -18,2 +18,5 @@ "use strict"; | ||
NodeHttp.prototype.sendMessage = function (msgBytes) { | ||
if (!this.options.methodDefinition.requestStream && !this.options.methodDefinition.responseStream) { | ||
this.request.setHeader("Content-Length", msgBytes.byteLength); | ||
} | ||
this.request.write(toBuffer(msgBytes)); | ||
@@ -20,0 +23,0 @@ this.request.end(); |
{ | ||
"name": "@improbable-eng/grpc-web-node-http-transport", | ||
"version": "0.9.6", | ||
"version": "0.10.0", | ||
"description": "Node HTTP Transport for use with @improbable-eng/grpc-web", | ||
@@ -24,3 +24,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@improbable-eng/grpc-web": "^0.9.6", | ||
"@improbable-eng/grpc-web": "^0.10.0", | ||
"@types/node": "^10.12.0", | ||
@@ -30,3 +30,3 @@ "google-protobuf": "^3.2.0", | ||
}, | ||
"gitHead": "d10299a0c589aa6a78c63d15a1d49738220e6caf" | ||
"gitHead": "596ae175a60853e53cd894229103f58587e1ebe6" | ||
} |
@@ -21,2 +21,6 @@ import * as http from "http"; | ||
sendMessage(msgBytes: Uint8Array) { | ||
if (!this.options.methodDefinition.requestStream && !this.options.methodDefinition.responseStream) { | ||
// Disable chunked encoding if we are not using streams | ||
this.request.setHeader("Content-Length", msgBytes.byteLength); | ||
} | ||
this.request.write(toBuffer(msgBytes)); | ||
@@ -23,0 +27,0 @@ this.request.end(); |
Sorry, the diff of this file is not supported yet
22264
219