Socket
Socket
Sign inDemoInstall

express-static

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-static - npm Package Compare versions

Comparing version 1.2.5 to 1.2.6

7

index.js
const fs = require('fs');
const url = require('url');
const path = require('path');
const mime = require('mail2/mime');
const mime = require('mime2');
/**

@@ -44,3 +44,4 @@ * [exports description]

}
if(new Date(req.headers['if-modified-since']) - stat.mtime == 0){
const mtime = new Date(stat.mtimeMs).toUTCString();
if(req.headers['if-modified-since'] === mtime){
res.writeHead(304);

@@ -51,3 +52,3 @@ return res.end();

var charset = /^text\/|^application\/(javascript|json)/.test(type) ? 'UTF-8' : false;
res.setHeader('Last-Modified', new Date(stat.mtimeMs).toUTCString());
res.setHeader('Last-Modified', mtime);
res.setHeader('Content-Length', stat.size);

@@ -54,0 +55,0 @@ res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : ''));

{
"name": "express-static",
"version": "1.2.5",
"version": "1.2.6",
"description": "serve static files for express",

@@ -30,4 +30,4 @@ "main": "index.js",

"dependencies": {
"mail2": "latest"
"mime2": "latest"
}
}

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