Skip to content

Misleading JavaDoc in ServletUriComponentsBuilder [SPR-17317] #21850

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

Closed
spring-projects-issues opened this issue Oct 1, 2018 · 2 comments
Closed
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Oct 1, 2018

johann-sonntagbauer opened SPR-17317 and commented

After the upgrade to Spring 5.1.0 the implementation of ServlerUriComponentsBuilder changed that X-Forwarded-* Headers are not respected any longer. 

But some JavaDoc comments on the methods suggest otherwise.

This leads to misleading assumptions because JavaDoc and implementation are different.

 

Example:

#fromCurrentServletMapping

JavaDoc: This method extracts values from "Forwarded" and "X-Forwarded-*" headers if found

This method delegates to 

 

#fromServletMapping which notes in the JavaDoc that 

As of 5.1, this method ignores "Forwarded" and "X-Forwarded-*" headers ...


Affects: 5.1 GA

Issue Links:

Referenced from: commits bb5c8ed

@spring-projects-issues
Copy link
Collaborator Author

Rossen Stoyanchev commented

I've removed all method-level comments and added a single note on the class level to state that forwarded headers are no longer used as of 5.1.

@spring-projects-issues
Copy link
Collaborator Author

johann-sonntagbauer commented

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants