Socket
Socket
Sign inDemoInstall

http-server

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-server - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

2

package.json
{
"name" : "http-server",
"preferGlobal": "true",
"version" : "0.2.2",
"version" : "0.2.3",
"author": "Marak Squires <marak.squires@gmail.com>",

@@ -6,0 +6,0 @@ "description" : "a simple zero-configuration command-line http server",

@@ -247,12 +247,6 @@ var fs = require('fs'),

urlBase = dirPath.replace(self.root, '');
newPath = (urlBase.split('/').length > 1)
? urlBase.split('/').pop()
: urlBase;
if (newPath[newPath.length - 1] !== '/') {
newPath += '/';
}
fs.readdir(dirPath, function(err, result) {
if (err) { return finish(404, {})}
result.forEach(function(v, i) {
html += ('<tr><td>' + '<a href="' + newPath + v + '">' + v + '</a></td></tr>');
html += ('<tr><td>' + '<a href="' + req.url + '/' + v + '">' + v + '</a></td></tr>');
});

@@ -259,0 +253,0 @@ html += '</table>';

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