Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2010-05-13 01:47:04 +0400
committerisaacs <i@izs.me>2010-05-13 01:47:04 +0400
commit38c5ec4d13c7c0face7a3884a415dd827a36dbdc (patch)
tree8ec775f609f2736cb34b8d99fa1edb5e65624034 /lib
parent58c119430c84dd8be2080fc561046cb1d556c671 (diff)
Use the new name for this if available.
Diffstat (limited to 'lib')
-rw-r--r--lib/utils/registry.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/utils/registry.js b/lib/utils/registry.js
index b5f236ecc..99a0cc8bc 100644
--- a/lib/utils/registry.js
+++ b/lib/utils/registry.js
@@ -125,7 +125,8 @@ function request (method, where, what, cb) {
// if (response.statusCode !== 200) return cb(new Error(
// "Status code " + response.statusCode + " from PUT "+where))
var data = ""
- response.setBodyEncoding("utf8")
+ response.setEncoding ? response.setEncoding("utf8")
+ : response.setBodyEncoding("utf8")
response.addListener("data", function (chunk) { data += chunk })
response.addListener("end", function () {
var parsed