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

needle

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

needle - npm Package Compare versions

Comparing version 2.5.1 to 2.5.2

10

lib/needle.js

@@ -50,6 +50,7 @@ //////////////////////////////////////////

var decompressors = {};
var brotli_supported = false;
try {
var zlib = require('zlib');
// Enable Z_SYNC_FLUSH to avoid Z_BUF_ERROR errors (Node PR #2595)

@@ -60,2 +61,3 @@ var zlib_options = {

};
var br_options = {

@@ -66,4 +68,2 @@ flush: zlib.BROTLI_OPERATION_FLUSH,

var zlib = require('zlib');
brotli_supported = typeof zlib.BrotliDecompress === 'function';
decompressors['x-deflate'] = bind_opts(zlib.Inflate, zlib_options);

@@ -73,3 +73,3 @@ decompressors['deflate'] = bind_opts(zlib.Inflate, zlib_options);

decompressors['gzip'] = bind_opts(zlib.Gunzip, zlib_options);
if (brotli_supported) {
if (typeof zlib.BrotliDecompress === 'function') {
decompressors['br'] = bind_opts(zlib.BrotliDecompress, br_options);

@@ -261,3 +261,3 @@ }

if ((options.compressed || defaults.compressed) && typeof zlib != 'undefined')
config.headers['accept-encoding'] = brotli_supported ? 'gzip, deflate, br' : 'gzip, deflate';
config.headers['accept-encoding'] = decompressors['br'] ? 'gzip, deflate, br' : 'gzip, deflate';

@@ -264,0 +264,0 @@ if (options.cookies)

{
"name": "needle",
"version": "2.5.1",
"version": "2.5.2",
"description": "The leanest and most handsome HTTP client in the Nodelands.",

@@ -5,0 +5,0 @@ "keywords": [

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