From 1200c1a50994bfaac2e9941f5bba8a641a1463a8 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Wed, 19 Apr 2017 15:52:11 -0700 Subject: [PATCH] Fix CORS exception (fixes #964) --- lime/_backend/html5/HTML5HTTPRequest.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lime/_backend/html5/HTML5HTTPRequest.hx b/lime/_backend/html5/HTML5HTTPRequest.hx index e0544119a..7d1f2c539 100644 --- a/lime/_backend/html5/HTML5HTTPRequest.hx +++ b/lime/_backend/html5/HTML5HTTPRequest.hx @@ -109,7 +109,7 @@ class HTML5HTTPRequest { } - if (!hasContentType) { + if (!hasContentType && parent.contentType != null) { request.setRequestHeader ("Content-Type", parent.contentType); @@ -381,4 +381,4 @@ class HTML5HTTPRequest { var promise:Dynamic; var uri:String; -} \ No newline at end of file +}