node-rest-client
Advanced tools
Comparing version 0.8.3 to 0.8.4
@@ -310,9 +310,7 @@ var http = require('http'), | ||
debug("content-type es", content); | ||
debug("conent-encoding es",encoding); | ||
debug("content-type: ", content); | ||
debug("content-encoding: ",encoding); | ||
if(!encoding || /^\s*$/.test(encoding)){ | ||
//just string values | ||
self.handleResponse(res,buffer.join(""),callback); | ||
}else if(encoding.indexOf("gzip") >= 0){ | ||
if(encoding.indexOf("gzip") >= 0){ | ||
debug("gunzip"); | ||
zlib.gunzip(Buffer.concat(buffer),function(er,gunzipped){ | ||
@@ -322,5 +320,9 @@ self.handleResponse(res,gunzipped,callback); | ||
}else if(encoding.indexOf("deflate") >= 0){ | ||
debug("inflate"); | ||
zlib.inflate(Buffer.concat(buffer),function(er,inflated){ | ||
self.handleResponse(res,inflated,callback); | ||
}); | ||
}else { | ||
debug("not compressed"); | ||
self.handleResponse(res,buffer.join(""),callback); | ||
} | ||
@@ -327,0 +329,0 @@ }, |
@@ -5,3 +5,3 @@ { | ||
"description": "node API REST client", | ||
"version": "0.8.3", | ||
"version": "0.8.4", | ||
"repository": { | ||
@@ -23,2 +23,2 @@ "type":"git", | ||
} | ||
} | ||
} |
34178
592