From 03922a59854b7eba6746fdf34b5b8ad046940311 Mon Sep 17 00:00:00 2001 From: gmdayley Date: Thu, 17 Jul 2014 14:41:14 -0600 Subject: [PATCH] don't submit content-length header on GET requests --- lib/restler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/restler.js b/lib/restler.js index 715845a..94f7858 100644 --- a/lib/restler.js +++ b/lib/restler.js @@ -65,7 +65,7 @@ function Request(uri, options) { this.options.data = buffer; this.headers['Content-Length'] = buffer.length; } - if (!this.options.data) { + if (!this.options.data && this.options.method !== 'GET') { this.headers['Content-Length'] = 0; } }