Permalink
Browse files

don't leak global variable 'encoding'

  • Loading branch information...
1 parent 8578368 commit eca48aef7de108c59acf0582bdf5b3b928a9ceae @marcuswestin committed Mar 30, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 server.js
View
4 server.js
@@ -111,7 +111,7 @@ function _handleMainModuleRequest(reqPath, req, res) {
response.push('__require__.__loadNext()')
}
- var buf = new Buffer(response.join('\n'), encoding='utf8')
+ var buf = new Buffer(response.join('\n'))
res.writeHead(200, { 'Cache-Control':'no-cache', 'Expires':'Fri, 31 Dec 1998 12:00:00 GMT', 'Content-Length':buf.length, 'Content-Type':'text/javascript' })
res.end(buf)
}
@@ -122,7 +122,7 @@ function _handleModuleRequest(reqPath, res) {
code += '\n__require__.__loadNext()'
- var buf = new Buffer(code, encoding='utf8')
+ var buf = new Buffer(code)
res.writeHead(200, { 'Cache-Control':'no-cache', 'Expires':'Fri, 31 Dec 1998 12:00:00 GMT', 'Content-Length':buf.length, 'Content-Type':'text/javascript' })
res.end(buf)
}

0 comments on commit eca48ae

Please sign in to comment.