Skip to content

Request param handling in HttpRequestValues overrides existing URI variables with same name #34499

Closed
@matejkobza

Description

@matejkobza

Following changes here (pulled with update of spring boot 3.4.2):
d927d64

I have found out that in case of connector definition like

@HttpExchange(
            method = "GET",
            value = "/transfers/{transfer-id}",
            accept = {"application/json"}
    )
    ResponseEntity<Transfer> getTransfer(@PathVariable("transfer-id") String transferId, @RequestParam(value = "transfer-id") String transferIdReqParamValue, @RequestParam(value = "hint",required = false) String hint, @RequestParam(value = "include",required = false) List<String> include, @RequestParam(value = "trim",required = false) List<String> trim);

causes problem in incorrect replacement of transfer-id path variable.

I am trying to assign "{transfer-id}" as path variable value of transfer-id and curly brackets are removed during HttpRequestValues.appendQueryParams execution and it causes to be modified in resulting GET request from:

/transfers/{transfer-id}?transfer-id=1234

to

/transfers/transfer-id?transfer-id=1234 

which is incorrect.

Image

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions