Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HalLinkDiscoverer doesn't decode '+' in a param of GET request #681

Open
dk2k opened this issue Dec 11, 2017 · 1 comment
Open

HalLinkDiscoverer doesn't decode '+' in a param of GET request #681

dk2k opened this issue Dec 11, 2017 · 1 comment

Comments

@dk2k
Copy link

dk2k commented Dec 11, 2017

Sample code:

    Map<String, Object> params = new HashMap<>();
    params.put("name", name);

    HalLinkDiscoverer linkDiscoverer = new HalLinkDiscoverer();
    Link link = linkDiscoverer.findLinkWithRel(IS_NAME_TAKEN_REL, getSearchLinks()).expand(params);

In a debug session I see the results as follows:

  1. http://localhost:8080/server/api/search/isNameTaken?name=777%20777;rel="isNameTaken" for "777 777"
    Space becomes "%20" which is in line with RFC https://www.w3schools.com/tags/ref_urlencode.asp
  2. http://localhost:8080/server/api/search/isNameTaken?name=777+777;rel="isNameTaken" for "777+777"
  • is supposed to become "%2B"
    Tested against version 0.24.0
@dk2k
Copy link
Author

dk2k commented Dec 13, 2017

& in param is another concern
http://localhost:8080/server/api/search/isNameTaken?name=fff for "fff&ggg"
ampersand is supposed to become "%26" and the part after ampersand shouldn't be truncated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant