vaadin / vaadin/framework

Enable Vaadin-Refresh on non-XHR Push

Open
#10,835 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Stale
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

Currently, in DefaultConnectionStateHandler::xhrInvalidContent , there is a check for UIDL_REFRESH_TOKEN = "Vaadin-Refresh" in the response text. If the token is found, there's a redirect to the wanted URL. This same behavior should also be implemented in pushInvalidContent, because currently that Vaadin-Refresh token is not working if Push is enabled (at least with with Long Polling).

  • Vaadin Framework version 8.4
  • Reproducible in Spring Bakery:
    • add @Push(transport = Transport.LONG_POLLING) to the UI
    • log in with any user
    • restart server and do nothing in the UI
  • Expected behavior
    Should be redirected to the login page
  • Actual behavior
    login JSP content is shown inside the error message, breaking the layout

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in DefaultConnectionStateHandler by comparing xhrInvalidContent with pushInvalidContent, focusing on how the Vaadin-Refresh token is detected and handled. Reproduce the Spring Bakery Long Polling scenario described in the issue; done means an expired session redirects to the login page instead of displaying the login JSP inside the push error message.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.