From 7fac4dc87b2507227666db9b74d83090f38d62e7 Mon Sep 17 00:00:00 2001 From: jkornobis <jkornobis@linagora.com> Date: Mon, 12 Nov 2012 09:29:07 -0500 Subject: [PATCH] Grancefully handle SSO redirections on Ajax requests --- program/js/app.js | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 1aa0082..c748d49 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -6271,6 +6271,11 @@ else if (request.status == 0 && status != 'abort') this.display_message(this.get_label('servererror') + ' (No connection)', 'error'); + // redirect to url specified in location header if not empty + var location_url = request.getResponseHeader("Location"); + if (location_url) + this.redirect(location_url); + // re-send keep-alive requests after 30 seconds if (action == 'keep-alive') setTimeout(function(){ ref.keep_alive(); }, 30000); -- Gitblit v1.9.1