New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 4.4.4 to 4.5.0

1

index.d.ts

@@ -68,2 +68,3 @@ import * as stream from 'stream'

headers: http.IncomingHttpHeaders
rawHeaders: string[]
prepare: (next: () => void) => void

@@ -70,0 +71,0 @@ // @deprecated

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

this.headers = {}
this.rawHeaders = []
const headers = options.headers || {}

@@ -111,2 +112,6 @@

for (const header of Object.keys(this.headers)) {
this.rawHeaders.push(header, this.headers[header])
}
// Use _lightMyRequest namespace to avoid collision with Node

@@ -113,0 +118,0 @@ this._lightMyRequest = {

2

package.json
{
"name": "light-my-request",
"version": "4.4.4",
"version": "4.5.0",
"description": "Fake HTTP injection library",

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

@@ -89,2 +89,16 @@ 'use strict'

test('request has rawHeaders', (t) => {
t.plan(3)
const dispatch = function (req, res) {
t.ok(Array.isArray(req.rawHeaders))
t.match(req.rawHeaders, ['super', 'duper', 'user-agent', 'lightMyRequest', 'host', 'example.com:8080'])
res.writeHead(200)
res.end()
}
inject(dispatch, { method: 'GET', url: 'http://example.com:8080/hello', headers: { Super: 'duper' } }, (err, res) => {
t.error(err)
})
})
test('passes remote address', (t) => {

@@ -91,0 +105,0 @@ t.plan(2)

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