diff --git a/lib/http.js b/lib/http.js index a66ed0d..2ae26f2 100644 --- a/lib/http.js +++ b/lib/http.js @@ -352,7 +352,7 @@ var HTTPObject = function(engine) { var state = this.states[this.states.length - 1]; var cmd = ["bin\\curl", "-X", this.method]; - if (this.headers.length > 0) { + if (Object.keys(this.headers).length > 0) { for (var key in this.headers) { var value = this.headers[key]; if (value != null) {