Skip to content

Commit

Permalink
Merge pull request #45 from linagora/master
Browse files Browse the repository at this point in the history
Grancefully handle SSO redirections on Ajax requests - V3
  • Loading branch information
alecpl committed Nov 16, 2012
2 parents b51eabe + 7fac4dc commit dd75973
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions program/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dd75973

Please sign in to comment.