Browse Source

Fix utf8stream references

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
2663c69f8d
  1. 4
      lib/http.js

4
lib/http.js

@ -9,7 +9,7 @@ function debug (x) {
var sys = require('sys');
var net = require('net');
var Utf8Stream = require('utf8_stream').Utf8Stream;
var Utf8Decoder = require('utf8decoder').Utf8Decoder;
var events = require('events');
var Buffer = require('buffer').Buffer;
@ -202,7 +202,7 @@ IncomingMessage.prototype.setEncoding = function (enc) {
// TODO check values, error out on bad, and deprecation message?
this._encoding = enc.toLowerCase();
if (this._encoding == 'utf-8' || this._encoding == 'utf8') {
this._decoder = new Utf8Stream();
this._decoder = new Utf8Decoder();
this._decoder.onString = function(str) {
this.emit('data', str);
};

Loading…
Cancel
Save