浏览代码

[bugfix] trim non-alphanum chars from urls

isundil 9 年之前
父节点
当前提交
9d844bf162
共有 1 个文件被更改,包括 1 次插入0 次删除
  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) {
+	url.replace(/\W/g, '');
 	var pathTokens = url.split('/')
 		,localPath = './public';