Socket
Socket
Sign inDemoInstall

postman-request

Package Overview
Dependencies
Maintainers
3
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postman-request - npm Package Compare versions

Comparing version 2.88.1-postman.21 to 2.88.1-postman.22

4

package.json

@@ -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 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc