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

fast-azure-storage

Package Overview
Dependencies
Maintainers
10
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-azure-storage - npm Package Compare versions

Comparing version 0.3.5 to 0.3.6

38

lib/utils.js

@@ -30,3 +30,6 @@ 'use strict';

'ESOCKETTIMEDOUT',
'ECONNREFUSED'
'ECONNREFUSED',
'RequestTimeoutError',
'RequestAbortedError',
'RequestContentLengthError'
];

@@ -128,2 +131,16 @@

// Reject on abort which happens if there is a timeout
req.once('abort', function() {
var err = new Error('Requested aborted by client due to timeout');
err.code = 'RequestTimeoutError';
reject(err);
});
// Reject on aborted which happens if the server aborts the request
req.once('aborted', function() {
var err = new Error('Request aborted by server');
err.code = 'RequestAbortedError';
reject(err);
});
// On response, we buffer up the incoming stream and resolve with that

@@ -143,2 +160,9 @@ req.once('response', function(res) {

// Reject on aborted, if server aborts the request
res.once('aborted', function() {
var err = new Error('Request aborted by server');
err.code = 'RequestAbortedError';
reject(err);
});
// Resolve on request end

@@ -148,2 +172,14 @@ res.once('end', function() {

res.payload = chunks.join('');
// Validate content-length if one was provided
var contentLength = res.headers['content-length'];
if (contentLength) {
var length = Buffer.byteLength(res.payload, 'utf8');
if (length !== parseInt(contentLength)) {
var err = new Error('Content-Length mismatch');
err.code = 'RequestContentLengthError';
return reject(err);
}
}
resolve(res);

@@ -150,0 +186,0 @@ });

4

package.json
{
"name": "fast-azure-storage",
"version": "0.3.5",
"version": "0.3.6",
"author": "Jonas Finnemann Jensen <jopsen@gmail.com>",

@@ -20,3 +20,3 @@ "description": "Fast client library for azure storage services",

"promise": "^7.0.4",
"pixl-xml": "^1.0.4"
"pixl-xml": "^1.0.10"
},

@@ -23,0 +23,0 @@ "optionalDependencies": {

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