question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dollar Sign in URL getting encoded

See original GitHub issue

Seems to be an issue with URL encoding

We have an endpoint to get the with $ sign

http://localhost:8080/myaccount/rest/v1/orders/$count

So when we send the request the URL is encoded as

http://localhost:8080/myaccount/rest/v1/orders/%24count

But $ is a reserved URL character per the below spec and should be ok to use like other reserved characters ( +, *, / , : etc.) which don’t get encoded

https://tools.ietf.org/html/rfc3986#section-2.2

Other framework like jersyclient , angular, springresettemplate all respects this and not encode $ sign.

The workaround is to disable the URL encoding , but shouldn’t be this taken care and not encoded at first place.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

3reactions
agrishkancommented, Apr 11, 2018

there is a work-around with RequestSpecBuilder: RequestSpecification spec = new RequestSpecBuilder().setUrlEncodingEnabled(false); spec.setBaseUri(...); Then it won’t escape the $ character.

0reactions
johanhalebycommented, Dec 14, 2017

It sounds like something that ought to be fixed. And now that you’ve digged into the code already it would be great if you could help out with a pull request 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

URL-Encoding of "dollar" - Online
The digits, preceded by a percent sign ("%"), are then used in the URI in place of the reserved character. (For a non-ASCII...
Read more >
What does dollar sign $ do in url? - Stack Overflow
In general, a character is reserved if the semantics of the URI changes if the character is replaced with its escaped US-ASCII encoding....
Read more >
Dollar sign in URL breaks link - Meta Stack Exchange
The dollar sign is a special character (and apparently hasn't been taken in with the automatic SO linkifier).
Read more >
URL Encoding of Special Characters - N-able
No information is available for this page.
Read more >
HTML - URL Encoding - Tutorialspoint
Decimal Hex Value Character URL Encode 128 80 € %80 129 81 %81 130 82 ‚ %82
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found