Permalink
Browse files

res.end(); >>> res.write(); res.end();

  • Loading branch information...
1 parent 591dff6 commit 7ac2c5246baaca233d9710b9771eece90c58ec10 @marcuswestin committed Jul 17, 2011
Showing with 2 additions and 5 deletions.
  1. +2 −5 server.js
View
@@ -128,8 +128,7 @@ function _handleMainModuleRequest(reqPath, req, res) {
var buf = new Buffer(response.join('\n'), encoding='utf8')
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.write(buf)
- res.end(response)
+ res.end(buf)
}
function _handleModuleRequest(reqPath, res) {
@@ -140,9 +139,7 @@ function _handleModuleRequest(reqPath, res) {
var buf = new Buffer(code, encoding='utf8')
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.write(buf)
- res.end()
-
+ res.end(buf)
}
function _getModuleCode(res, reqPath) {

0 comments on commit 7ac2c52

Please sign in to comment.