serve-static
Advanced tools
Comparing version 1.11.0 to 1.11.1
@@ -0,1 +1,7 @@ | ||
1.11.1 / 2016-06-10 | ||
=================== | ||
* Fix redirect error when `req.url` contains raw non-URL characters | ||
* deps: send@0.14.1 | ||
1.11.0 / 2016-06-07 | ||
@@ -2,0 +8,0 @@ =================== |
@@ -5,3 +5,3 @@ /*! | ||
* Copyright(c) 2011 TJ Holowaychuk | ||
* Copyright(c) 2014-2015 Douglas Christopher Wilson | ||
* Copyright(c) 2014-2016 Douglas Christopher Wilson | ||
* MIT Licensed | ||
@@ -17,2 +17,3 @@ */ | ||
var encodeUrl = require('encodeurl') | ||
var escapeHtml = require('escape-html') | ||
@@ -177,3 +178,3 @@ var parseUrl = require('parseurl') | ||
// reformat the URL | ||
var loc = url.format(originalUrl) | ||
var loc = encodeUrl(url.format(originalUrl)) | ||
var msg = 'Redirecting to <a href="' + escapeHtml(loc) + '">' + escapeHtml(loc) + '</a>\n' | ||
@@ -180,0 +181,0 @@ var res = this.res |
{ | ||
"name": "serve-static", | ||
"description": "Serve static files", | ||
"version": "1.11.0", | ||
"version": "1.11.1", | ||
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>", | ||
@@ -9,5 +9,6 @@ "license": "MIT", | ||
"dependencies": { | ||
"encodeurl": "~1.0.1", | ||
"escape-html": "~1.0.3", | ||
"parseurl": "~1.3.1", | ||
"send": "0.14.0" | ||
"send": "0.14.1" | ||
}, | ||
@@ -14,0 +15,0 @@ "devDependencies": { |
@@ -134,5 +134,4 @@ # serve-static | ||
// Create server | ||
var server = http.createServer(function(req, res){ | ||
var done = finalhandler(req, res) | ||
serve(req, res, done) | ||
var server = http.createServer(function onRequest (req, res) { | ||
serve(req, res, finalhandler(req, res)) | ||
}) | ||
@@ -164,5 +163,4 @@ | ||
// Create server | ||
var server = http.createServer(function(req, res){ | ||
var done = finalhandler(req, res) | ||
serve(req, res, done) | ||
var server = http.createServer(function onRequest (req, res) { | ||
serve(req, res, finalhandler(req, res)) | ||
}) | ||
@@ -226,3 +224,3 @@ | ||
function setCustomCacheControl(res, path) { | ||
function setCustomCacheControl (res, path) { | ||
if (serveStatic.mime.lookup(path) === 'text/html') { | ||
@@ -229,0 +227,0 @@ // Custom Cache-Control for HTML files |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20636
152
4
246
+ Addedencodeurl@~1.0.1
+ Addedencodeurl@1.0.2(transitive)
+ Addedsend@0.14.1(transitive)
- Removedsend@0.14.0(transitive)
Updatedsend@0.14.1