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.

Query string encoded incorrectly

See original GitHub issue

v2.83.1.

I am not sure how to fix this issue, but it seems to boil down to request not encoding the query string correctly. I tested this with expressjs and requestb.in.

I was testing these 2 urls:

http://localhost:9002/unicodeq/?q=ıoı-test
http://localhost:9002/unicodeq/?q=русский-текст-test

But on the server they are received as

q: 1o1-test (converted from latin letters to ascii)
q: @CAA:89-B5:AB-test

The request code is rather basic:

		request.get({
			url: uri,
			maxRedirects: 5,
			timeout: 5000,
			headers: {
				"User-Agent": "Mozilla/5.0"
			}
		});

How would I fix this issue so that the URL is requested correctly?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

1reaction
xPawcommented, Dec 19, 2018

Stale bot damn it.

0reactions
stale[bot]commented, Dec 19, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Querystring encoding issue - Stack Overflow
The query string parameters have to get URL-encoded. The problem ist th % character which is used for URL encoding, so it has...
Read more >
IT11210: HTTP URL QUERY STRINGS INCORRECTLY ... - IBM
If the HTTPRequest node Request URL is dynamically set using the Local Environment override and includes a query string that contains reserved characters ......
Read more >
Rails: Fixing 'Invalid query parameters: invalid %-encoding'
In a full stack apps, sometimes users manually edit query strings in the address bar, and make requests that have invalid encodings.
Read more >
How should incorrectly encoded URLs be handled?
The reason ? and & in URLs need to be percent encoded is because they have special meanings when defining a query string....
Read more >
Using Special Characters in Query String - Caspio Online Help
Query String is a great way of passing parameters from one DataPage to another. However, in some cases, values may contain special characters...
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