Permalink
Browse files

NODEJS-998: acs-node needs to indicate server to compress response

https://jira.appcelerator.org/browse/NODEJS-998
updated to pass sdk to APIResponseHandler
  • Loading branch information...
1 parent efe810c commit 8ac8aa2a27cd39eef8224dfb684565642f6b6edb @ypjin ypjin committed Jul 24, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/util/utils.js
View
@@ -109,7 +109,7 @@ exports.sendRequest = function(host, port, path, method, data, header, useSecure
}
var req = protocol.request(options);
- req.on('response', APIResponseHandler(callback));
+ req.on('response', APIResponseHandler(sdk, callback));
req.on("error",function(err) {
callback(errServerReturn);
@@ -149,7 +149,7 @@ exports.sendRequestWithFile = function(host, port, path, method, data, header, u
var req = protocol.request(options);
- req.on('response', APIResponseHandler(callback));
+ req.on('response', APIResponseHandler(sdk, callback));
req.on("error",function(err) {
callback(errServerReturn);
@@ -198,7 +198,7 @@ function buildErrResponse(code, message) {
return {'meta' : {'status': 'fail', 'code': code, 'message': message}};
}
-function APIResponseHandler(callback) {
+function APIResponseHandler(sdk, callback) {
return function(response) {

0 comments on commit 8ac8aa2

Please sign in to comment.