[Pkg-javascript-commits] [node-stream-http] 35/208: Mask high bits out of binary data read as text
Bastien Roucariès
rouca at moszumanska.debian.org
Sun Aug 13 13:39:25 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-stream-http.
commit 03aeb58709fd17c06e66d9431349ae03c38ec4a5
Author: John Hiesey <john at hiesey.com>
Date: Tue Jul 7 21:13:12 2015 -0700
Mask high bits out of binary data read as text
---
lib/response.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/response.js b/lib/response.js
index d95b835..0ceae66 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -117,7 +117,7 @@ IncomingMessage.prototype._onXHRProgress = function () {
if (self._charset === 'x-user-defined') {
var buffer = new Buffer(newData.length)
for (var i = 0; i < newData.length; i++)
- buffer[i] = newData.charCodeAt(i)
+ buffer[i] = newData.charCodeAt(i) & 0xff
self.push(buffer)
} else {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stream-http.git
More information about the Pkg-javascript-commits
mailing list