projects
/
angular-drzb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8982ebc
)
Added global flag to path replace function in handleRequest to allow more than one...
author
Jaap Karan Singh Dua
<jksdua@gmail.com>
Tue, 5 Jun 2012 11:06:48 +0000
(21:06 +1000)
committer
Igor Minar
<igor@angularjs.org>
Thu, 18 Oct 2012 06:15:05 +0000
(23:15 -0700)
scripts/web-server.js
patch
|
blob
|
history
diff --git
a/scripts/web-server.js
b/scripts/web-server.js
index
1ff37b3
..
d560e4a
100755
(executable)
--- a/
scripts/web-server.js
+++ b/
scripts/web-server.js
@@
-86,7
+86,7
@@
StaticServlet.MimeMap = {
StaticServlet.prototype.handleRequest = function(req, res) {
var self = this;
- var path = ('./' + req.url.pathname).replace('//','/').replace(/%(..)/, function(match, hex){
+ var path = ('./' + req.url.pathname).replace('//','/').replace(/%(..)/
g
, function(match, hex){
return String.fromCharCode(parseInt(hex, 16));
});
var parts = path.split('/');