diff --git a/lib/http.js b/lib/http.js index 0030ddcc0b..782cd62935 100644 --- a/lib/http.js +++ b/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); };