Enable Vaadin-Refresh on non-XHR Push
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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