Improve code.

This commit is contained in:
Miao Jiang 2013-02-21 19:05:32 +08:00
parent 648e170fa8
commit 78a53743de
6 changed files with 41 additions and 41 deletions

View file

@ -50,8 +50,6 @@
if ((_ref = this.options) == null) {
this.options = {};
}
c = this.curl_;
c.chunks = [];
length = 0;
this.debug = (_ref1 = (_ref2 = this.defaultOptions.DEBUG) != null ? _ref2 : this.options.DEBUG) != null ? _ref1 : this.debug;
this.effectiveOptions = {};
@ -69,6 +67,8 @@
this.setOptions({
URL: this.url
});
c = this.curl_;
c.chunks = [];
c.on('data', function(chunk) {
curl.log("receive " + chunk.length + " bytes");
c.chunks.push(chunk);