-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Remove redundant slashes in URI-string before it's URI will be resolve. #1423
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
Conversation
|
@daggerok as I've asked you on the issue you've opened in Spring Boot, we need a Jira issue in our tracker for this change. Thanks! |
|
@snicoll I created one here: https://jira.spring.io/browse/SPR-15529 |
See more about issue here: spring-projects/spring-boot#9133 Issuse: SPR-15529
| * </p> | ||
| */ | ||
| private static String squashSlashes(String uri) { | ||
| return isNull(uri) ? uri : uri.replaceAll("/{2,}", "/"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this collapse http://example.com/// to http:/example.com/?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Shredder121, you are talking about URL, but not URI, which actually i'm replacing..
so answering on your question: no, it wouldn't, it should collapse only URI: /// -> /
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think function squashSlashes should move to some tool utility class. :)
|
@daggerok is that PR still relevant? |
|
This evolved from https://jira.spring.io/browse/SPR-15529 to https://jira.spring.io/browse/SPR-15560 and where the actual issue was not the duplicate slash but a bug in how |
See more about issue here: spring-projects/spring-boot#9133