Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

don't leak global variable 'encoding'

  • Loading branch information...
commit eca48aef7de108c59acf0582bdf5b3b928a9ceae 1 parent 8578368
Marcus Westin authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 server.js
4 server.js
View
@@ -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)
}
Please sign in to comment.
Something went wrong with that request. Please try again.