Skip to content

DefaultApiVersionInserter encodes already encoded URI #36080

@mengelbrecht

Description

@mengelbrecht

The DefaultApiVersionInserter encodes an already encoded URI when inserting a path segment version.
This way the URI is double encoded.

The following code:

ApiVersionInserter.usePathSegment(0).insertVersion("1", URI.create("http://localhost/test?foo=%20"))

yields:

http://localhost/1/test?foo=%2520

expected is:

http://localhost/1/test?foo=%20

Attached is a sample project. Executing the included ApiVersionInserterTest reproduces the error.
demo.zip

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: supersededAn issue that has been superseded by anothertype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions