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

st

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

st - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

2

package.json
{
"name": "st",
"version": "0.5.1",
"version": "0.5.2",
"description": "A module for serving static files. Does etags, caching, etc.",

@@ -5,0 +5,0 @@ "main": "st.js",

@@ -273,2 +273,14 @@ module.exports = st

var isDirectory = stat.isDirectory()
if (isDirectory) {
end() // we won't need this fd for a directory in any case
if (next && this.opt.passthrough === true && this._index === false) {
// this is done before if-modified-since and if-non-match checks so
// cached modified and etag values won't return 304's if we've since
// switched to !index. See Issue #51.
return next()
}
}
var ims = req.headers['if-modified-since']

@@ -289,11 +301,2 @@ if (ims) ims = new Date(ims).getTime()

var isDirectory = stat.isDirectory()
if (isDirectory) {
end()
if (next && this.opt.passthrough === true && this._index === false) {
return next()
}
}
// only set headers once we're sure we'll be serving this request

@@ -300,0 +303,0 @@ if (!res.getHeader('cache-control') && this._cacheControl)

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