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

knox

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

knox - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

16

lib/client.js

@@ -49,5 +49,5 @@ /*!

function getContentLength(headers) {
function getHeader(headers, headerNameLowerCase) {
for (var header in headers) {
if (header.toLowerCase() === 'content-length') {
if (header.toLowerCase() === headerNameLowerCase) {
return headers[header];

@@ -96,2 +96,8 @@ }

if (options.bucket.indexOf('.') !== -1 && this.secure) {
throw new Error('AWS bucket names with periods in them cannot be used ' +
'alongside SSL (the default). Set `secure: false` to turn off SSL and ' +
'use HTTP instead.');
}
this.url = this.secure ? this.https : this.http;

@@ -137,4 +143,4 @@ };

, resource: auth.canonicalizeResource('/' + this.bucket + filename)
, contentType: headers['Content-Type']
, md5: headers['Content-MD5'] || ''
, contentType: getHeader(headers, 'content-type')
, md5: getHeader(headers, 'content-md5') || ''
, amazonHeaders: auth.canonicalizeHeaders(headers)

@@ -260,3 +266,3 @@ });

Client.prototype.putStream = function(stream, filename, headers, fn){
var contentLength = getContentLength(headers);
var contentLength = getHeader(headers, 'content-length');
if (contentLength === null) {

@@ -263,0 +269,0 @@ process.nextTick(function () {

@@ -5,3 +5,3 @@ {

"keywords": ["aws", "amazon", "s3"],
"version": "0.4.3",
"version": "0.4.4",
"author": "TJ Holowaychuk <tj@learnboost.com>",

@@ -8,0 +8,0 @@ "contributors": [

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