http-server
Advanced tools
Comparing version 0.2.2 to 0.2.3
{ | ||
"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>'; |
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
179833
2062