Skip to content

WebClient's UriBuilder option should encode path parameters passed into build [SPR-17465] #21997

Closed
@spring-projects-issues

Description

@spring-projects-issues

Benjamin Conlan opened SPR-17465 and commented

When using the reactive web WebClient's uribuilder building a Uri path value doesn't get encoded as expected:

(Excuse code here... Composed from phone)

webClient.get().uri(builder -> builder.path("/{test}").build("encode/this"))

Behaves differently to:

webClient.get().uri("/{test}", "encode/this")

I would expect the url path segment in the 1st case to also be encoded.


Affects: 5.0.8

Issue Links:

Referenced from: commits 2405161, e4c84ec

Backported to: 5.0.11

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions