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

serve-static

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serve-static - npm Package Compare versions

Comparing version 1.11.0 to 1.11.1

6

HISTORY.md

@@ -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

index.js

@@ -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": {

12

README.md

@@ -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

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