Comparing version 4.2.0 to 4.2.1
@@ -194,12 +194,16 @@ "use strict"; | ||
} | ||
if (rawBody instanceof ArrayBuffer) { | ||
if (isStream(rawBody)) { | ||
if (typeof rawBody.getHeaders === "function") { | ||
headers.extend(rawBody.getHeaders()); | ||
} | ||
return headers; | ||
} | ||
if (Buffer.isBuffer(rawBody)) { | ||
if (!omitDefaultHeaders && !headers.has("Content-Length")) { | ||
headers.set("Content-Length", rawBody.byteLength.toString()); | ||
headers.set("Content-Length", String(rawBody.length)); | ||
} | ||
return headers; | ||
} | ||
if (rawBody instanceof ReadableStream) | ||
return headers; | ||
throw new TypeError("Unknown body type"); | ||
} | ||
//# sourceMappingURL=node.js.map |
{ | ||
"name": "servie", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"description": "Standard HTTP interfaces for HTTP clients and servers in node.js and browsers", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105408
969