diff options
author | Artur <artur@vaadin.com> | 2017-02-22 12:21:38 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2017-03-16 16:21:24 +0200 |
commit | 82af8b5bcc73500e69d5ebd6770f4360ebefbe87 (patch) | |
tree | 0e78b8f30890b66cdcc9f08ff85053f271fb94e7 /client/src | |
parent | beb4e49031f5ea1ec9192ce2dbeca426c8b477f1 (diff) | |
download | vaadin-framework-82af8b5bcc73500e69d5ebd6770f4360ebefbe87.tar.gz vaadin-framework-82af8b5bcc73500e69d5ebd6770f4360ebefbe87.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/src')
-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, |