postman-request
Advanced tools
Comparing version 2.88.1-postman.21 to 2.88.1-postman.22
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "2.88.1-postman.21", | ||
"version": "2.88.1-postman.22", | ||
"repository": { | ||
@@ -37,3 +37,3 @@ "type": "git", | ||
"har-validator": "~5.1.3", | ||
"http-signature": "~1.2.0", | ||
"http-signature": "~1.3.1", | ||
"is-typedarray": "~1.0.0", | ||
@@ -40,0 +40,0 @@ "isstream": "~0.1.2", |
@@ -590,3 +590,4 @@ 'use strict' | ||
if (!self.hasHeader('content-type')) { | ||
self.setHeader('Content-Type', mime.lookup(src.path)) | ||
// @note fallback to 'application/octet-stream' if mime.lookup returns `false` | ||
self.setHeader('Content-Type', mime.lookup(src.path) || 'application/octet-stream') | ||
} | ||
@@ -661,8 +662,19 @@ } else { | ||
} else if (!self.src) { | ||
if (self._auth.hasAuth && !self._auth.sentAuth) { | ||
if ((self._auth.hasAuth && !self._auth.sentAuth) || self.hasHeader('content-length')) { | ||
self.end() | ||
return | ||
} | ||
if (self.method !== 'GET' && typeof self.method !== 'undefined') { | ||
self.setHeader('Content-Length', 0) | ||
switch (self.method) { | ||
case 'GET': | ||
case 'HEAD': | ||
case 'TRACE': | ||
case 'DELETE': | ||
case 'CONNECT': | ||
case 'OPTIONS': | ||
case undefined: | ||
// @note this behavior is same as Node.js | ||
break | ||
default: | ||
self.setHeader('Content-Length', 0) | ||
break | ||
} | ||
@@ -902,2 +914,4 @@ self.end() | ||
self.req.removeHeader(header) | ||
// also remove from the `self` for the consistency | ||
self.removeHeader(header) | ||
}) | ||
@@ -904,0 +918,0 @@ } |
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
239510
3208
+ Addedhttp-signature@1.3.6(transitive)
+ Addedjsprim@2.0.2(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removedjsprim@1.4.2(transitive)
Updatedhttp-signature@~1.3.1