Skip to content

RestTemplate drops trailing / from request URI [SPR-15201] #19765

@spring-projects-issues

Description

@spring-projects-issues

Andy Wilkinson opened SPR-15201 and commented

In the latest 5.0.0 snapshots, RestTemplate has started dropping a trailing / when the URI is passed in as a String. For example, a request to http://localhost:8080/spring/ will become a request to http://localhost:8080/spring.

The loss of the / happens during variable expansion so I think that this commit may have introduced the problem. A workaround is to pass a URI into RestTemplate rather than a String so that expansion does not occur.


Affects: 5.0 M5

Issue Links:

Referenced from: commits b487ed6

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