[Pkg-javascript-commits] [node-static] 35/151: fix chunk copy error in node 0.2.3+

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Tue Jan 7 23:17:57 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository node-static.

commit 996dc6e43daf3604b86c0d7bd3f492a40b483cdb
Author: cloudhead <self at cloudhead.net>
Date:   Wed Oct 13 15:19:26 2010 -0400

    fix chunk copy error in node 0.2.3+
---
 lib/node-static.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/node-static.js b/lib/node-static.js
index 1367c77..a7f3691 100644
--- a/lib/node-static.js
+++ b/lib/node-static.js
@@ -236,9 +236,9 @@ this.Server.prototype.stream = function (pathname, files, buffer, res, callback)
                 mode: 0666,
                 bufferSize: 4096
             }).addListener('data', function (chunk) {
-                chunk.copy (buffer, offset, 0);
-                res.write  (chunk, 'binary');
-                offset   += chunk.length;
+                buffer.write(chunk, offset, 0);
+                res.write   (chunk, 'binary');
+                offset    += chunk.length;
             }).addListener('close', function () {
                 streamFile(files, offset);
             }).addListener('error', function (err) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-static.git



More information about the Pkg-javascript-commits mailing list