Skip to content

Misleading JavaDoc in ServletUriComponentsBuilder [SPR-17317] #21850

Closed
@spring-projects-issues

Description

@spring-projects-issues

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

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: taskA general task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions