Skip to content

UriUtils.encode should not skip already encoded strings #2002

Open
@Zordid

Description

@Zordid

I ended up here using feign because of a seemingly simple task: encode a String using RFC 3986.

Against the odds, this turns out to be quite complicated. Java fails because the URLEncoder is not for URIs, due to the Space=+...
Apache does not work, Guava does not have a decoder...

Now feign... I couldn't believe my eyes when my property based tests failed to properly encode the literal String "%07"...
I look into the code and find stuff like "skips already encoded strings"... :(

This is a very bad design decision in itself, but even worse: how does one now encode such a literal string? I cannot find an option to disable this (for me) unwanted behaviour...

Thanks!

Metadata

Metadata

Assignees

Labels

bugUnexpected or incorrect behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions