js/loader: postpone redirection handling

Redirections should not be executed unless the original request has been
terminated and removed from pending requests.

fixes #6989
This commit is contained in:
Thomas Gelf 2014-09-02 19:05:49 +02:00
parent 1734f01040
commit f12a5741b8
1 changed files with 2 additions and 2 deletions

View File

@ -329,8 +329,7 @@
this.icinga.ui.reloadCss();
}
var redirect = req.getResponseHeader('X-Icinga-Redirect');
if (this.processRedirectHeader(req)) return;
if (req.getResponseHeader('X-Icinga-Redirect')) return;
// div helps getting an XML tree
var $resp = $('<div>' + req.responseText + '</div>');
@ -567,6 +566,7 @@
delete this.requests[req.$target.attr('id')];
this.icinga.ui.fadeNotificationsAway();
this.processRedirectHeader(req);
if (typeof req.loadNext !== 'undefined') {
if ($('#col2').length) {