Socket
Socket
Sign inDemoInstall

sirv

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sirv - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

15

build.js

@@ -58,7 +58,13 @@ const fs = require('fs');

function send(req, res, file, stats, headers={}) {
let code=200, tmp, opts={}
function send(req, res, file, stats, headers) {
let code=200, tmp, opts={};
headers = { ...headers };
for (let key in headers) {
tmp = res.getHeader(key);
if (tmp) headers[key] = tmp;
}
if (tmp = res.getHeader('content-type')) {
headers = { ...headers, 'Content-Type': tmp };
headers['Content-Type'] = tmp;
}

@@ -77,4 +83,3 @@

}
if (!tmp) headers = { ...headers };
headers['Content-Range'] = `bytes ${start}-${end}/${stats.size}`;

@@ -81,0 +86,0 @@ headers['Content-Length'] = (end - start + 1);

{
"name": "sirv",
"version": "1.0.5",
"version": "1.0.6",
"description": "The optimized & lightweight middleware for serving requests to static assets",

@@ -27,3 +27,3 @@ "repository": "lukeed/sirv",

},
"gitHead": "45e2dafabb65fc68b7fb3ec21d47bf40a2cbb8d4"
"gitHead": "fab9f18e95fdd752a0919da3fe51bb41f08c1276"
}

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