Skip to content

WebClient's Uri Builder is not encoding "+" in query parameter. #23474

Closed as not planned
@VikramAdh

Description

@VikramAdh

I am using below code snippet to re-produce this issue.

final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
String value= "2+3 4";
String key = "val";
queryParams.add(key, value);
ResponseSpec response = agent.get(headers->{}, queryParams, "/data/read");
String responseBody = respnose.bodyToMono(String.class).block(); 

The service call to producer application is happening successfully but it returns 404-Not Found since the query parameter is not encoded completely.

Encoded final url: /data/read?val=2+3%204

Expected encoded URL: /data/read?val=2%2B3%204

Here "+" is not encoded. Appreciate any suggestion here.

Thanks,
Vikram.N

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions