Socket
Socket
Sign inDemoInstall

undici

Package Overview
Dependencies
Maintainers
2
Versions
211
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

undici - npm Package Compare versions

Comparing version 2.0.6 to 2.0.7

11

lib/core/client.js

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

/* istanbul ignore next */
if (nodeMajorVersion >= 12) {
if (nodeMajorVersion === 12) {
super()

@@ -355,2 +355,9 @@ this.initialize(

{},
client[kHeadersTimeout]
)
} else if (nodeMajorVersion > 12) {
super()
this.initialize(
HTTPParser.RESPONSE,
{},
client[kMaxHeadersSize],

@@ -479,3 +486,3 @@ insecureHTTPParser,

if (upgrade !== request.upgrade) {
if (upgrade !== Boolean(request.upgrade)) {
util.destroy(socket, new SocketError('bad upgrade'))

@@ -482,0 +489,0 @@ return 1

2

lib/core/request.js

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

this.upgrade = !!upgrade
this.upgrade = upgrade

@@ -61,0 +61,0 @@ this.path = path

{
"name": "undici",
"version": "2.0.6",
"version": "2.0.7",
"description": "An HTTP/1.1 client, written from scratch for Node.js",

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

@@ -10,6 +10,7 @@ 'use strict'

test('basic upgrade', (t) => {
t.plan(5)
t.plan(6)
const server = net.createServer((c) => {
c.on('data', (d) => {
t.ok(/upgrade: websocket/i.test(d))
c.write('HTTP/1.1 101\r\n')

@@ -16,0 +17,0 @@ c.write('hello: world\r\n')

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc