[react_native] JS files from D2012956: [react_native] Never return null from XHR.getAllResponseHeaders if request has completed

This commit is contained in:
Andy Street 2015-04-22 09:10:58 -07:00
parent 3595b79ec3
commit eafe93096c
1 changed files with 2 additions and 1 deletions

View File

@ -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();