Skip to content

Spring MVC re-creates form data from request params and re-encoding can change the content-length #32471

@ramyav16

Description

@ramyav16

On Spring 6.1.5 when content type is set as application/x-www-form-urlencoded the request gets encoded value. However it also alters the request String to remove the number of characters added as part of the encoding.

Header has: Content-Type - application/x-www-form-urlencoded

Request Body has String: name=Test&lastName=Test@er

In Spring controller the String appearing is: name=Test&lastName=Test%40

While it encodes, the last 2 characters have been removed by Spring. This issue exists in 6.1.x. Request any help on the same.

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