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

X-Forwarded-Proto with comma separated list causes incorrect scheme [SPR-12816] #17413

spring-issuemaster opened this issue Mar 13, 2015 · 0 comments


None yet
2 participants
Copy link

commented Mar 13, 2015

Miranda LeBlanc opened SPR-12816 and commented

This issue is very similar to #17410. In the UriComponentsBuilder, the scheme is set using the following X-Forwarded-Proto which can be a comma separated list as well. For example, I am seeing "http,http" as the value of my X-Forwarded-Proto header.

String protocolHeader = request.getHeaders().getFirst("X-Forwarded-Proto");
if (StringUtils.hasText(protocolHeader)) {
scheme = protocolHeader;

This causes issues later on when the URIs are built due to the invalid characters within the scheme.

Affects: 4.1.5

Issue Links:

  • #17410 X-Forwarded-Port with Comma Separated List Not Able to be Parsed in Spring 4.1.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.