Skip to content

Commit

Permalink
fixing cross-port bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ericz committed Mar 12, 2011
1 parent e3a391b commit 50d2cd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/nowServerLib.js
Expand Up @@ -91,8 +91,8 @@ function serveFile(filename, request, response){
hostPort = host[1];
}

var parsedFile = file.toString().replace("**SERVER**", hostServer);
parsedFile = parsedFile.replace("**PORT**", hostPort);
var parsedFile = file.toString().replace(/\*\*SERVER\*\*/g, hostServer);
parsedFile = parsedFile.replace(/\*\*PORT\*\*/g, hostPort);
response.writeHead(200);
response.write(parsedFile);
response.end();
Expand Down

0 comments on commit 50d2cd9

Please sign in to comment.