Skip to content

UriComponentsBuilder should be case-insensitive when parsing URL scheme names [SPR-10779] #15406

@spring-projects-issues

Description

@spring-projects-issues

André Wolf opened SPR-10779 and commented

According to RFC 1738 "Uniform Resource Locators (URL)", the scheme names of an URL allows the following characters: lower case letters a to z, digits, the characters plus, period, and hyphen. It also states:

"For resiliency, programs interpreting URLs should treat upper case letters as equivalent to lower case in scheme names (e.g., allow "HTTP" as well as "http")." (section 2.1. The main parts of URLs).

Unfortunately UriComponentsBuilder does not accept the upper case variants HTTP and HTTPS, it throws an IllegalArgumentException instead.


Affects: 3.1.2

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions