Socket
Socket
Sign inDemoInstall

koa-send

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-send - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

13

index.js

@@ -1,2 +0,1 @@

/**

@@ -6,3 +5,3 @@ * Module dependencies.

var onSocketError = require('on-socket-error');
var onFinished = require('finished');
var debug = require('debug')('koa-send');

@@ -37,3 +36,3 @@ var assert = require('assert');

assert(ctx, 'koa context required');
assert(path, 'path path required');
assert(path, 'pathname required');
opts = opts || {};

@@ -43,3 +42,3 @@

debug('send "%s" %j', path, opts);
var root = opts.root ? resolve(opts.root) : '';
var root = opts.root ? normalize(resolve(opts.root)) : '';
var index = opts.index;

@@ -93,5 +92,3 @@ var maxage = opts.maxage || 0;

var stream = this.body = fs.createReadStream(path);
onSocketError(this, function(){
stream.destroy();
});
onFinished(this, stream.destroy.bind(stream));

@@ -144,2 +141,2 @@ return path;

if ('\\\\' == path.substring(0, 2)) return true; // Microsoft Azure absolute path
}
}

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

"repository": "koajs/send",
"version": "1.2.2",
"version": "1.2.3",
"keywords": [

@@ -24,3 +24,3 @@ "koa",

"dependencies": {
"on-socket-error": "~1.0.1",
"finished": "~1.1.1",
"debug": "*"

@@ -27,0 +27,0 @@ },

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