Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Socket write encoding case sensitivity #1586

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+5 −0
Split
View
@@ -411,6 +411,11 @@ Socket.prototype._writeOut = function(data, encoding, fd, cb) {
pool = null;
allocNewPool();
}
+
+ if (encoding)
+ {
+ encoding = String(encoding).toLowerCase();
+ }
if (!encoding || encoding == 'utf8' || encoding == 'utf-8') {
// default to utf8