From d01ba43e8e0d35ff137e01d65c110da48cb7c0c1 Mon Sep 17 00:00:00 2001 From: Kjartan Ferstl Date: Mon, 18 Jul 2016 21:59:38 +0200 Subject: [PATCH] Bugfix: datajs library fills this.headers with headers that stay forever. Problem occures when the $batch request sets the "Content-Type: multipart/mixed; boundary=changeset_xxxxx" header, xxx stays forever and is not overwritten by datajs. Therefor the server ignores all requests any $batch request after the first one. --- src/b00_breeze.dataService.odata.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/b00_breeze.dataService.odata.js b/src/b00_breeze.dataService.odata.js index edb0683..da437c4 100644 --- a/src/b00_breeze.dataService.odata.js +++ b/src/b00_breeze.dataService.odata.js @@ -120,7 +120,7 @@ OData.read({ requestUri: url, - headers: this.headers + headers: __extend({}, this.headers) }, function (data, response) { var inlineCount; @@ -228,7 +228,7 @@ var contentKeys = saveContext.contentKeys; OData.request({ - headers: this.headers, + headers: __extend({}, this.headers), requestUri: url, method: "POST", data: requestData