summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-11-16 10:33:20 -0800
committerAleksander Machniak <alec@alec.pl>2012-11-16 10:33:20 -0800
commitdd759730b0d2e7ac75e2011997e6cb654065590a (patch)
tree68e26aa62bbe4fd3edfa2fa053798abdff2c34e0 /program/js/app.js
parentb51eabe2cdc831611ea64f14693f8ea049482217 (diff)
parent7fac4dc87b2507227666db9b74d83090f38d62e7 (diff)
Merge pull request #45 from linagora/master
Grancefully handle SSO redirections on Ajax requests - V3
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 90b4ebbcf..9b33c4e21 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -6306,6 +6306,11 @@ function rcube_webmail()
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(); ref.start_keepalive(); }, 30000);