Comparing version 1.0.15 to 1.0.16
Changelog | ||
========= | ||
Version 1.0.16 | ||
-------------- | ||
*Released 2015-01-16* | ||
* Resolves [issue #178](https://github.com/theturtle32/WebSocket-Node/issues/178) - Ping Frames with no data | ||
Version 1.0.15 | ||
@@ -5,0 +12,0 @@ -------------- |
@@ -255,26 +255,15 @@ /************************************************************************ | ||
if (this.length > 0) { | ||
if (this.mask) { | ||
if (!nullMask) { | ||
// Generate a mask key | ||
maskKey = parseInt(Math.random()*0xFFFFFFFF); | ||
} | ||
else { | ||
maskKey = 0x00000000; | ||
} | ||
this.maskBytes.writeUInt32BE(maskKey, 0, true); | ||
// write the mask key | ||
this.maskBytes.copy(output, outputPos); | ||
outputPos += 4; | ||
if (this.mask) { | ||
maskKey = nullMask ? 0 : (Math.random()*0xFFFFFFFF) | 0; | ||
this.maskBytes.writeUInt32BE(maskKey, 0, true); | ||
// write the mask key | ||
this.maskBytes.copy(output, outputPos); | ||
outputPos += 4; | ||
data.copy(output, outputPos); | ||
var dataSegment = output.slice(outputPos); | ||
bufferUtil.mask(dataSegment, this.maskBytes, dataSegment, 0, this.length); | ||
// xor(output.slice(outputPos), this.maskBytes, 0); | ||
} | ||
else { | ||
data.copy(output, outputPos); | ||
} | ||
bufferUtil.mask(data, this.maskBytes, output, outputPos, this.length); | ||
} | ||
else { | ||
data.copy(output, outputPos); | ||
} | ||
@@ -281,0 +270,0 @@ return output; |
@@ -17,3 +17,3 @@ { | ||
"author": "Brian McKelvey <brian@worlize.com> (https://www.worlize.com/)", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"repository": { | ||
@@ -20,0 +20,0 @@ "type": "git", |
@@ -26,4 +26,8 @@ WebSocket Client & Server Implementation for Node | ||
***Current Version: 1.0.15*** — Released 2015-01-13 | ||
***Current Version: 1.0.16*** — Released 2015-01-16 | ||
***Version 1.0.16*** | ||
* Resolves [issue #178](https://github.com/theturtle32/WebSocket-Node/issues/178) - Ping Frames with no data | ||
***Version 1.0.15*** | ||
@@ -30,0 +34,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
298
186496
2751