Comparing version 0.0.12 to 0.0.13
@@ -197,5 +197,9 @@ // Load modules | ||
var decode = function (value, encoding) { | ||
return new Buffer(value, encoding).toString(); | ||
}; | ||
if (self.output.length === 1) { | ||
// Single string output | ||
return self.output[0].slice(self.output[0].indexOf('\r\n\r\n') + 4); | ||
return decode(self.output[0].slice(self.output[0].indexOf('\r\n\r\n') + 4), self.outputEncodings[0]); | ||
} | ||
@@ -211,3 +215,3 @@ | ||
// String | ||
output += self.output[i]; | ||
output += decode(self.output[i], self.outputEncodings[i]); | ||
} | ||
@@ -214,0 +218,0 @@ } |
{ | ||
"name": "shot", | ||
"description": "Injects a fake HTTP request/response into a node HTTP server", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"author": "Eran Hammer <eran@hueniverse.com> (http://hueniverse.com)", | ||
@@ -6,0 +6,0 @@ "contributors":[ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11121
203