Socket
Socket
Sign inDemoInstall

undici

Package Overview
Dependencies
0
Maintainers
2
Versions
205
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.4 to 1.2.5

5

lib/client.js

@@ -443,2 +443,7 @@ 'use strict'

if (length === 1) {
// https://github.com/mcollina/undici/issues/269
this.socket._unrefTimer()
}
assert(statusCode >= 200)

@@ -445,0 +450,0 @@

2

package.json
{
"name": "undici",
"version": "1.2.4",
"version": "1.2.5",
"description": "An HTTP/1.1 client, written from scratch for Node.js",

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

@@ -334,7 +334,9 @@ 'use strict'

test('basic POST with custom stream', (t) => {
t.plan(8)
t.plan(4)
const expected = Buffer.alloc(2000000).toString()
const server = createServer(postServer(t, expected + expected))
const server = createServer((req, res) => {
req.resume().on('end', () => {
res.end('hello')
})
})
t.tearDown(server.close.bind(server))

@@ -351,5 +353,2 @@

method: 'POST',
headers: {
'content-length': Buffer.byteLength(expected) * 2
},
requestTimeout: 0,

@@ -377,5 +376,7 @@ body

body.emit('data', '')
body.emit('data', expected)
while (!client[kSocket]._writableState.needDrain) {
body.emit('data', Buffer.alloc(4096))
}
client[kSocket].on('drain', () => {
body.emit('data', expected)
body.emit('data', Buffer.alloc(4096))
body.emit('close')

@@ -382,0 +383,0 @@ })

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