Skip to content
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

Fix redirect loop bug in ResourceFileServlet #333

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

lachlan-roberts
Copy link
Collaborator

I ran into a bug in ResourceFileServlet, where trying to access a static file puts you in a redirect loop resulting in a URI looking like this:

http://localhost:8080/hello.txt/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/

The call to getHolderEntry("/") was finding the context root mapping instead of the default mapping, this was causing an infinite redirect bug. This PR changes this to use getServletMapping("/") which tests by pathSpec.

Copy link

Gemini encountered an error creating the summary. You can try again by commenting @code-review-assist summarize.

@copybara-service copybara-service bot merged commit afe26bc into main Jan 24, 2025
11 checks passed
@copybara-service copybara-service bot deleted the ee8-ResourceFileServlet-RedirectLoop branch January 24, 2025 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants