From eafe93096caa3cad22c5ccbaa64abd9708825f70 Mon Sep 17 00:00:00 2001 From: Andy Street Date: Wed, 22 Apr 2015 09:10:58 -0700 Subject: [PATCH] [react_native] JS files from D2012956: [react_native] Never return null from XHR.getAllResponseHeaders if request has completed --- Libraries/Network/XMLHttpRequestBase.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Libraries/Network/XMLHttpRequestBase.js b/Libraries/Network/XMLHttpRequestBase.js index cfd1e35cc9..4a4f16ac68 100644 --- a/Libraries/Network/XMLHttpRequestBase.js +++ b/Libraries/Network/XMLHttpRequestBase.js @@ -60,6 +60,7 @@ class XMLHttpRequestBase { } return headers.join('\n'); } + // according to the spec, return null <==> no response has been received return null; } @@ -131,7 +132,7 @@ class XMLHttpRequestBase { return; } this.status = status; - this.responseHeaders = responseHeaders; + this.responseHeaders = responseHeaders || {}; this.responseText = responseText; this._setReadyState(this.DONE); this._sendLoad();