aboutsummaryrefslogtreecommitdiffstats
path: root/src/Server.js
diff options
context:
space:
mode:
authorMisko Hevery2010-01-24 19:33:04 -0800
committerMisko Hevery2010-01-24 19:33:04 -0800
commit0f42fa2930f5827ac9f1eac2ce09ea3bf9533563 (patch)
tree2dc03ca6a158cefa71ab51476fa9e29b984826a9 /src/Server.js
parenta5c446441fee005975a82885771e8d931e7a4e7a (diff)
downloadangular.js-0f42fa2930f5827ac9f1eac2ce09ea3bf9533563.tar.bz2
fix closure compiler issues
Diffstat (limited to 'src/Server.js')
-rw-r--r--src/Server.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Server.js b/src/Server.js
index 2932c09b..5c4ec3c6 100644
--- a/src/Server.js
+++ b/src/Server.js
@@ -13,14 +13,13 @@ Server.prototype = {
request: function(method, url, request, callback) {
var requestId = this.uuid + (this.nextId++);
+ var payload = this.base64url(toJson({'u':url, 'm':method, 'p':request}));
+ var totalPockets = Math.ceil(payload.length / this.maxSize);
+ var baseUrl = this.url + "/$/" + requestId + "/" + totalPockets + "/";
angularCallbacks[requestId] = function(response) {
delete angularCallbacks[requestId];
callback(200, response);
};
- var payload = {'u':url, 'm':method, 'p':request};
- payload = this.base64url(toJson(payload));
- var totalPockets = Math.ceil(payload.length / this.maxSize);
- var baseUrl = this.url + "/$/" + requestId + "/" + totalPockets + "/";
for ( var pocketNo = 0; pocketNo < totalPockets; pocketNo++) {
var pocket = payload.substr(pocketNo * this.maxSize, this.maxSize);
this.getScript(baseUrl + (pocketNo+1) + "?h=" + pocket, noop);