fix(http): return request url if it cannot be retrieved from response
closes #12837
This commit is contained in:

committed by
Victor Berchet

parent
a0c58a6b5c
commit
1d53a870dd
@ -75,9 +75,8 @@ export class XHRConnection implements Connection {
|
||||
}
|
||||
|
||||
const headers: Headers = Headers.fromResponseHeaderString(_xhr.getAllResponseHeaders());
|
||||
|
||||
const url: string = getResponseURL(_xhr);
|
||||
|
||||
// IE 9 does not provide the way to get URL of response
|
||||
const url = getResponseURL(_xhr) || req.url;
|
||||
const statusText: string = _xhr.statusText || 'OK';
|
||||
|
||||
let responseOptions = new ResponseOptions({body, status, headers, statusText, url});
|
||||
|
Reference in New Issue
Block a user