Browse Source

[bugfix] trim non-alphanum chars from urls

isundil 9 years ago
parent
commit
9d844bf162
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/httpServer.js

+ 1 - 0
src/httpServer.js

@@ -50,6 +50,7 @@ HttpServer.prototype.isRequestPublic = function(url) {
 };
 };
 
 
 HttpServer.prototype.servePublic = function(url, res) {
 HttpServer.prototype.servePublic = function(url, res) {
+	url.replace(/\W/g, '');
 	var pathTokens = url.split('/')
 	var pathTokens = url.split('/')
 		,localPath = './public';
 		,localPath = './public';