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 #6883 relative welcome redirect #6886

Merged
merged 5 commits into from Sep 22, 2021

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Sep 21, 2021

Fix #6883 relative welcome redirect

  • make all redirects able to be relative
  • added test for relative redirection in ResourceService

Signed-off-by: Greg Wilkins gregw@webtide.com

Fix #6883 relative welcome redirect
 + make all redirects able to be relative
 + added test for relative redirection in ResourceService

Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw gregw linked an issue Sep 21, 2021 that may be closed by this pull request
@gregw gregw added this to In progress in Jetty 9.4.44 FROZEN via automation Sep 21, 2021
@lachlan-roberts
Copy link
Contributor

@gregw the new tests do not seem to test the original issue. I locally reverted the changes to ResourceService and all the new tests in DefaultServletTest still passed.

@gregw
Copy link
Contributor Author

gregw commented Sep 22, 2021

@lachlan-roberts good catch. There is a bug in HttpFieldsContainsHeaderValue, it just looks for a substring rather than a proper containment.
I'll see if I can fix that... else I'll need another matcher.

Fix the HttpFieldsContainsHeaderValue impl

Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw
Copy link
Contributor Author

gregw commented Sep 22, 2021

@lachlan-roberts I've pushed a fix for that, but there is a good chance it might break some other tests that were relying on the wrong behavior

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw gregw requested a review from sbordet September 22, 2021 11:29
@joakime joakime moved this from In progress to Review in progress in Jetty 9.4.44 FROZEN Sep 22, 2021
Jetty 9.4.44 FROZEN automation moved this from Review in progress to Reviewer approved Sep 22, 2021
@gregw gregw merged commit 34c7344 into jetty-9.4.x Sep 22, 2021
Jetty 9.4.44 FROZEN automation moved this from Reviewer approved to Done Sep 22, 2021
@gregw gregw deleted the jetty-9.4.x-6883-relative-welcome-redirect branch September 22, 2021 22:16
gregw added a commit that referenced this pull request Sep 22, 2021
Fix #6883 relative welcome redirect
 + make all redirects able to be relative
 + added test for relative redirection in ResourceService

Signed-off-by: Greg Wilkins <gregw@webtide.com>
gregw added a commit that referenced this pull request Sep 23, 2021
* Fix #6883 relative welcome redirect (#6886)

Fix #6883 relative welcome redirect
 + make all redirects able to be relative
 + added test for relative redirection in ResourceService

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Welcome file redirects do not honor the relativeRedirectAllowed option
3 participants