Socket
Socket
Sign inDemoInstall

postman-request

Package Overview
Dependencies
24
Maintainers
4
Versions
61
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.81.1-postman.1 to 2.81.1-postman.2

3

package.json

@@ -10,3 +10,3 @@ {

],
"version": "2.81.1-postman.1",
"version": "2.81.1-postman.2",
"repository": {

@@ -46,2 +46,3 @@ "type": "git",

"safe-buffer": "^5.0.1",
"stream-length": "^1.0.2",
"stringstream": "~0.0.4",

@@ -48,0 +49,0 @@ "tough-cookie": "~2.3.0",

@@ -9,2 +9,3 @@

- Redirect behavior for 307 responses when Host header is set: https://github.com/request/request/issues/2666
- Fix missing `content-length` header for streaming requests: https://github.com/request/request/issues/316

@@ -11,0 +12,0 @@ ## Super simple to use

@@ -20,2 +20,3 @@ 'use strict'

var isstream = require('isstream')
var streamLength = require('stream-length')
var isTypedArray = require('is-typedarray').strict

@@ -540,3 +541,12 @@ var helpers = require('./lib/helpers')

if (isstream(self.body)) {
self.body.pipe(self)
if (self.hasHeader('content-length')) {
self.body.pipe(self)
} else { // certain servers require content-length to function. we try to pre-detect if possible
streamLength(self.body, {}, function (err, len) {
if (!(err || self._started || self.hasHeader('content-length') || len === null || len < 0)) {
self.setHeader('content-length', len)
}
self.body.pipe(self)
})
}
} else {

@@ -543,0 +553,0 @@ setContentLength()

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc