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

ifile

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ifile - npm Package Compare versions

Comparing version 0.3.6 to 0.3.7

test/Static/Mount_Huangshan.jpg

2

package.json

@@ -18,3 +18,3 @@ {

],
"version": "0.3.6",
"version": "0.3.7",
"url": "https://github.com/DoubleSpout/ifile",

@@ -21,0 +21,0 @@ "homepage": "https://github.com/DoubleSpout/ifile",

@@ -7,14 +7,18 @@ var ifile = require('./index.js')

ifile.add([
["/static2",__dirname+path.sep+"test"],
//["/static2",__dirname+path.sep+"test"],
['/test',__dirname],
["/static2/",__dirname+path.sep+"user",0],
["static","user",[]],
["static/sss/","user",['js','css']],
["/static/ss/","user"+path.sep+"fsdf",['js']],
["/static/saa","user"+path.sep+"fsdf"+path.sep,[]]
//["/static2/",__dirname+path.sep+"user",0],
//["static","user",[]],
//["static/sss/","user",['js','css']],
//["/static/ss/","user"+path.sep+"fsdf",['js']],
//["/static/saa","user"+path.sep+"fsdf"+path.sep,[]]
],function(req, res, isStatic){
//console.log(res)
res.end('isStatic: '+isStatic);
//res.end('isStatic: '+isStatic);
res.statusCode = 404;
res.end('404')
})

@@ -21,0 +25,0 @@

@@ -16,3 +16,3 @@ var ifile = require('../index.js');

ifile.add([
["/static",__dirname],
["/Static",__dirname],
["/static_aaa",__dirname],

@@ -125,3 +125,3 @@ ["static2","static2"],

assert.equal(res.headers["etag"], ts.slice(0, ts.length-3) +'_'+hs1_stat.size)
assert.equal(res.headers["last-modified"], new Date(hs1_stat.mtime).toUTCString())
assert.equal(res.headers["last-modified"].slice(-20), new Date(hs1_stat.mtime).toUTCString().slice(-20))
assert.equal(res.headers["cache-control"], 'max-age=2592000')

@@ -157,3 +157,3 @@ assert.equal(res.headers["transfer-encoding"], "chunked")

assert.equal(res.headers["etag"], ts.slice(0, ts.length-3) +'_'+hs2_stat.size)
assert.equal(res.headers["last-modified"], new Date(hs2_stat.mtime).toUTCString())
assert.equal(res.headers["last-modified"].slice(-20), new Date(hs2_stat.mtime).toUTCString().slice(-20))
assert.equal(res.headers["cache-control"], 'max-age=2592000')

@@ -177,3 +177,3 @@ assert.equal(res.headers["transfer-encoding"], "chunked")

assert.equal(res.headers["etag"], ts.slice(0, ts.length-3) +'_'+hs2_stat.size)
assert.equal(res.headers["last-modified"], new Date(hs2_stat.mtime).toUTCString())
assert.equal(res.headers["last-modified"].slice(-20), new Date(hs2_stat.mtime).toUTCString().slice(-20))
assert.equal(res.headers["cache-control"], 'max-age=2592000')

@@ -195,3 +195,3 @@ assert.equal(res.headers["content-type"], 'image/jpeg')

assert.equal(res.headers["etag"], ts.slice(0, ts.length-3) +'_'+hs1_stat.size)
assert.equal(res.headers["last-modified"], new Date(hs1_stat.mtime).toUTCString())
assert.equal(res.headers["last-modified"].slice(-20), new Date(hs1_stat.mtime).toUTCString().slice(-20))
assert.equal(res.headers["cache-control"], 'max-age=2592000')

@@ -224,3 +224,3 @@ assert.equal(res.headers["content-type"], 'image/jpeg')

assert.equal(res.headers["etag"], ts.slice(0, ts.length-3) +'_'+testcss1_stat.size)
assert.equal(res.headers["last-modified"], new Date(testcss1_stat.mtime).toUTCString())
assert.equal(res.headers["last-modified"].slice(-20), new Date(testcss1_stat.mtime).toUTCString().slice(-20))
assert.equal(res.headers["cache-control"], 'max-age=2592000')

@@ -242,3 +242,3 @@ assert.equal(res.headers["content-length"], testcss1_stat.size)

assert.equal(res.headers["etag"], ts.slice(0, ts.length-3) +'_'+testjs1_stat.size)
assert.equal(res.headers["last-modified"], new Date(testjs1_stat.mtime).toUTCString())
assert.equal(res.headers["last-modified"].slice(-20), new Date(testjs1_stat.mtime).toUTCString().slice(-20))
assert.equal(res.headers["cache-control"], 'max-age=2592000')

@@ -264,3 +264,3 @@ assert.equal(res.headers["content-length"], testjs1_stat.size)

assert.equal(res.headers["etag"], ts.slice(0, ts.length-3) +'_'+testjs1_stat.size)
assert.equal(res.headers["last-modified"], new Date(testjs1_stat.mtime).toUTCString())
assert.equal(res.headers["last-modified"].slice(-20), new Date(testjs1_stat.mtime).toUTCString().slice(-20))
assert.equal(res.headers["cache-control"], 'max-age=2592000')

@@ -283,3 +283,3 @@ assert.equal(res.headers["content-type"], 'application/javascript')

assert.equal(res.headers["etag"], ts.slice(0, ts.length-3) +'_'+testcss1_stat.size)
assert.equal(res.headers["last-modified"], new Date(testcss1_stat.mtime).toUTCString())
assert.equal(res.headers["last-modified"].slice(-20), new Date(testcss1_stat.mtime).toUTCString().slice(-20))
assert.equal(res.headers["cache-control"], 'max-age=2592000')

@@ -302,3 +302,3 @@ assert.equal(res.headers["content-type"], 'text/css')

assert.equal(res.headers["etag"], ts.slice(0, ts.length-3) +'_'+testcss2_stat.size)
assert.equal(res.headers["last-modified"], new Date(testcss2_stat.mtime).toUTCString())
assert.equal(res.headers["last-modified"].slice(-20), new Date(testcss2_stat.mtime).toUTCString().slice(-20))
assert.equal(res.headers["cache-control"], 'max-age=2592000')

@@ -320,3 +320,3 @@ assert.equal(res.headers["content-length"], testcss2_stat.size)

assert.equal(res.headers["etag"], ts.slice(0, ts.length-3) +'_'+testjs2_stat.size)
assert.equal(res.headers["last-modified"], new Date(testjs2_stat.mtime).toUTCString())
assert.equal(res.headers["last-modified"].slice(-20), new Date(testjs2_stat.mtime).toUTCString().slice(-20))
assert.equal(res.headers["cache-control"], 'max-age=2592000')

@@ -360,3 +360,3 @@ assert.equal(res.headers["content-length"], testjs2_stat.size)

assert.equal(res.headers["etag"], ts.slice(0, ts.length-3) +'_'+testjs2_stat.size)
assert.equal(res.headers["last-modified"], new Date(testjs2_stat.mtime).toUTCString())
assert.equal(res.headers["last-modified"].slice(-20), new Date(testjs2_stat.mtime).toUTCString().slice(-20))
assert.equal(res.headers["cache-control"], 'max-age=2592000')

@@ -431,3 +431,3 @@

assert.equal(res.headers["etag"], ts.slice(0, ts.length-3) +'_'+testxml3_stat.size)
assert.equal(res.headers["last-modified"], new Date(testxml3_stat.mtime).toUTCString())
assert.equal(res.headers["last-modified"].slice(-20), new Date(testxml3_stat.mtime).toUTCString().slice(-20))
assert.equal(res.headers["cache-control"], 'max-age=2592000')

@@ -455,3 +455,3 @@

assert.equal(res.headers["etag"], ts.slice(0, ts.length-3) +'_'+testxml3_stat.size)
assert.equal(res.headers["last-modified"], new Date(testxml3_stat.mtime).toUTCString())
assert.equal(res.headers["last-modified"].slice(-20), new Date(testxml3_stat.mtime).toUTCString().slice(-20))
assert.equal(res.headers["cache-control"], 'max-age=2592000')

@@ -458,0 +458,0 @@

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