Skip to content

Prevent caching of non-document requests in HttpSessionRequestCache #17687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

therepanic
Copy link
Contributor

@therepanic therepanic commented Aug 11, 2025

When the browser requests a missing favicon.ico on the login page, it triggers an ERROR dispatch.
This request was mistakenly saved and caused redirection to /error after login instead of the original URL.

This change checks for DispatcherType.ERROR and Sec-Fetch-Dest header to avoid caching such requests.

Closes #17686

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 11, 2025
@therepanic therepanic marked this pull request as ready for review August 11, 2025 13:44
When the browser requests a missing favicon.ico on the login page, it
triggers an ERROR dispatch.
This request was mistakenly saved and caused redirection to /error after
login instead of the original URL.

This change checks for DispatcherType.ERROR and Sec-Fetch-Dest header to
avoid caching such requests.

Closes spring-projects#17686

Signed-off-by: Andrey Litvitski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The browser accesses a nonexistent resource during login, leading to /error after login
2 participants