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

http-basic

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-basic - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

12

index.js

@@ -65,7 +65,7 @@ 'use strict';

delete res.headers['content-encoding'];
res.body = res.body.pipe(zlib.createGunzip()).pipe(new PassThrough());
res.body = res.body.pipe(zlib.createGunzip());
break;
case 'deflate':
delete res.headers['content-encoding'];
res.body = res.body.pipe(zlib.createInflate()).pipe(new PassThrough());
res.body = res.body.pipe(zlib.createInflate());
break;

@@ -84,2 +84,4 @@ }

if (options.followRedirects && isRedirect(res.statusCode)) {
// prevent leakage of file handles
res.body.resume();
return request(duplex ? 'GET' : method, res.headers.location, options, callback);

@@ -113,2 +115,4 @@ } else {

if (res.statusCode === 304 && cachedResponse) { // Not Modified
// prevent leakage of file handles
res.body.resume();
res = new Response(cachedResponse.statusCode, cachedResponse.headers, cachedResponse.body);

@@ -119,2 +123,4 @@ res.fromCache = true;

} else if (cacheUtils.canCache(res)) {
// prevent leakage of file handles
cachedResponse && cachedResponse.body.resume();
var cachedResponseBody = new PassThrough();

@@ -131,2 +137,4 @@ var resultResponseBody = new PassThrough();

} else {
// prevent leakage of file handles
cachedResponse && cachedResponse.body.resume();
return callback(null, res);

@@ -133,0 +141,0 @@ }

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

2

package.json
{
"name": "http-basic",
"version": "1.0.2",
"version": "1.0.3",
"description": "Very low level wrapper arround http.request/https.request",

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

@@ -0,0 +0,0 @@ # http-basic

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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