Browse Source

Fix default encoding for outgoing HTTP messages

Was causing send() to throw argument errors because arrays of ints would get
paired with the "raws" encoding. The bug was introduced in 8eb1294.
v0.7.4-release
Ryan Dahl 16 years ago
parent
commit
d1a13bdd35
  1. 3
      src/http.js

3
src/http.js

@ -173,7 +173,8 @@ node.inherits(OutgoingMessage, node.EventEmitter);
OutgoingMessage.prototype.send = function (data, encoding) {
this.output.push(data);
this.outputEncodings.push(encoding || "raws");
encoding = encoding || (data.constructor === Array ? "raw" : "raws");
this.outputEncodings.push(encoding);
};
OutgoingMessage.prototype.sendHeaderLines = function (first_line, headers) {

Loading…
Cancel
Save