spring-projects / spring-projects/spring-hateoas
WebMvcLinkBuilder path encoded twice
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 476
- PR merge metrics
- No merged PRs in 30d
Description
Using the link to build the location header as follows:
Link link = linkTo(ExampleController.class).slash("FOO BAR")
URI location = link.toUri()
Results in the space getting encoded twice:
http://localhost/example/FOO%2520BAR
When it should be:
http://localhost/example/FOO%20BAR
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with WebMvcLinkBuilder, linkTo(ExampleController.class), slash("FOO BAR"), and toUri(). Trace how the link path is encoded between slash() and toUri(). Done means the resulting location is http://localhost/example/FOO%20BAR rather than using %2520.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100