Skip to content

UriComponentsBuilder.pathSegments(...) should drop empty segments [SPR-9077] #13715

Closed
@spring-projects-issues

Description

@spring-projects-issues

Oliver Drotbohm opened SPR-9077 and commented

When handing empty segments into UriComponentsBuilder.pathSegments(...) double slashes are created which are semantically equivalent to a single slash. Thus, empty path segments can/should be dropped:

UriComponentsBuilder.pathSegment("", "foo", "", "bar");

Result: //foo//bar
Expected: /foo/bar

Affects: 3.1 GA

Referenced from: commits 010abd0

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions