diff options
author | Artur <artur@vaadin.com> | 2017-02-22 12:21:38 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-02-22 12:21:38 +0200 |
commit | 04a20bf66646bc10f219966ad18af8b7bd995c77 (patch) | |
tree | b1c7d54c72c9c09da45549389a059bce32528981 /client | |
parent | ca1bfa7511e35fad802271604158afd7be6531d0 (diff) | |
download | vaadin-framework-04a20bf66646bc10f219966ad18af8b7bd995c77.tar.gz vaadin-framework-04a20bf66646bc10f219966ad18af8b7bd995c77.zip |
Support Vaadin custom protocols in Vaadin-Refresh redirects (#8597)
A login page you want to redirect to is typically in the webapp root,
which you can now refer to as "Vaadin-Refresh: context://login.html"
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java b/client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java index af3f229312..f98165b105 100644 --- a/client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java +++ b/client/src/main/java/com/vaadin/client/communication/DefaultConnectionStateHandler.java @@ -421,7 +421,8 @@ public class DefaultConnectionStateHandler implements ConnectionStateHandler { + "(:\\s*(.*?))?(\\s|$)") .exec(responseText); if (refreshToken != null) { - WidgetUtil.redirect(refreshToken.getGroup(2)); + WidgetUtil.redirect(getConnection() + .translateVaadinUri(refreshToken.getGroup(2))); } else { handleUnrecoverableCommunicationError( "Invalid JSON response from server: " + responseText, |