🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

express-static-gzip

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-static-gzip - npm Package Compare versions

Comparing version

to
1.1.3

test/wwwroot/filename with spaces.txt.gz

2

index.js

@@ -40,3 +40,3 @@ let serveStatic = require('serve-static');

//test if any compression is available
var matchedFile = files[req.path];
var matchedFile = files[decodeURIComponent(req.path)];
if (matchedFile) {

@@ -43,0 +43,0 @@ //as long as there is any compression available for this file, add the Vary Header (used for caching proxies)

{
"name": "express-static-gzip",
"version": "1.1.2",
"version": "1.1.3",
"description": "simple wrapper on top of express.static, that allows serving pre-gziped files",

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

@@ -171,2 +171,11 @@ const expect = require('chai').expect;

it('should handle url encoded path', function(){
setupServer();
return requestFile("/filename with spaces.txt", { 'accept-encoding': 'gzip'}).then(resp => {
expect(resp.statusCode).to.equal(200);
expect(resp.body).to.equal('"filename with spaces.txt.gz"');
});
});
/**

@@ -201,2 +210,2 @@ *

}
});
});