Socket
Socket
Sign inDemoInstall

koa-send

Package Overview
Dependencies
3
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.1

10

index.js

@@ -6,2 +6,3 @@

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

@@ -41,3 +42,3 @@ var assert = require('assert');

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

@@ -87,3 +88,8 @@ var maxage = opts.maxage || 0;

this.type = extname(path);
this.body = fs.createReadStream(path);
var stream = this.body = fs.createReadStream(path);
onSocketError(this, function(){
stream.destroy();
});
return path;
}

@@ -90,0 +96,0 @@ }

6

package.json

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

"repository": "koajs/send",
"version": "1.0.0",
"version": "1.1.1",
"keywords": [

@@ -24,4 +24,8 @@ "koa",

"dependencies": {
"on-socket-error": "~1.0.1",
"debug": "*"
},
"scripts": {
"test": "make test"
}
}
# koa-send
# koa-send [![Build Status](https://travis-ci.org/koajs/send.png)](https://travis-ci.org/koajs/send)

@@ -4,0 +4,0 @@ Static file serving middleware.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc