Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

light-my-request

Package Overview
Dependencies
Maintainers
2
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

light-my-request - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

lib/request.js

@@ -81,3 +81,3 @@ 'use strict'

const payload = Buffer.concat(chunks)
this.headers['content-length'] = this.headers['content-length'] || payload.length
this.headers['content-length'] = this.headers['content-length'] || ('' + payload.length)
this._lightMyRequest.payload = payload

@@ -84,0 +84,0 @@ return next()

{
"name": "light-my-request",
"version": "1.1.0",
"version": "1.1.1",
"description": "Fake HTTP injection library",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -478,2 +478,12 @@ 'use strict'

test('can override stream payload content-length header without request content-length', (t) => {
t.plan(1)
const dispatch = function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' })
t.equal(req.headers['content-length'], '2')
}
inject(dispatch, { method: 'post', url: '/', payload: getTestStream() }, () => {})
})
test('writeHead returns single buffer payload', (t) => {

@@ -480,0 +490,0 @@ t.plan(3)

Sorry, the diff of this file is not supported yet

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