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

undici

Package Overview
Dependencies
Maintainers
3
Versions
216
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 4.5.0 to 4.5.1

25

lib/core/util.js

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

function getServerName (host) {
if (!host) {
return null
}
assert.strictEqual(typeof host, 'string')
function getHostname (host) {
if (host[0] === '[') {

@@ -102,2 +96,19 @@ const idx = host.indexOf(']')

// IP addresses are not valid server names per RFC6066
// > Currently, the only server names supported are DNS hostnames
function getServerName (host) {
if (!host) {
return null
}
assert.strictEqual(typeof host, 'string')
const servername = getHostname(host)
if (net.isIP(servername)) {
return ''
}
return servername
}
function deepClone (obj) {

@@ -104,0 +115,0 @@ return JSON.parse(JSON.stringify(obj))

@@ -317,3 +317,3 @@ /* globals AbortController */

// 29. If signal is not null, then make this’s signal follow signal.
if (signal !== null) {
if (signal != null) {
if (

@@ -398,3 +398,3 @@ !signal ||

if (
(('body' in init && init !== null) || inputBody !== null) &&
(('body' in init && init.body != null) || inputBody != null) &&
(request.method === 'GET' || request.method === 'HEAD')

@@ -409,3 +409,3 @@ ) {

// 36. If init["body"] exists and is non-null, then:
if ('body' in init && init !== null) {
if ('body' in init && init.body != null) {
// 1. Let Content-Type be null.

@@ -434,3 +434,3 @@ // 2. Set initBody and Content-Type to the result of extracting

// null, then:
if (inputOrInitBody !== null && inputOrInitBody.source == null) {
if (inputOrInitBody != null && inputOrInitBody.source == null) {
// 1. If this’s request’s mode is neither "same-origin" nor "cors",

@@ -452,3 +452,3 @@ // then throw a TypeError.

// 40. If initBody is null and inputBody is non-null, then:
if (initBody == null && inputBody !== null) {
if (initBody == null && inputBody != null) {
// 1. If input is unusable, then throw a TypeError.

@@ -455,0 +455,0 @@ if (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) {

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

@@ -5,0 +5,0 @@ "homepage": "https://undici.nodejs.org",

@@ -178,5 +178,5 @@ # undici

The fetch specication allows users to skip consuming the response body by relying on
The fetch specification allows users to skip consuming the response body by relying on
garbage collection to release connection resources. Undici does the same. However,
garbage collection in node is less aggressive and deterministic (due to the lack
garbage collection in Node is less aggressive and deterministic (due to the lack
of clear idle periods that browser have through the rendering refresh rate)

@@ -183,0 +183,0 @@ which means that leaving the release of connection resources to the garbage collector

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