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 parameter name is encoded while it shouldn't be

See original GitHub issue

Expected behavior

Query parameter name shouldn’t be encoded.

Actual behavior

Query parameter name is encoded.

Steps to reproduce

If we go to following code, you will notice that we are encoding the query parameter name as well. I am wondering why would query parameter name needed to be encoded.

QueryStringEncoder.java

Also, if you look at unit test, it also don’t test any specific use-case for parameter name to be encoded, although there are unit tests around parameter value to be encoded.

QueryStringEncoderTest.java

We works as a proxy app, and using Vertx, which in-turn uses Netty, and when we proxy following request, it causing the query parameter name being encoded while (probably) it shouldn’t.

Input /server/path?jREJBBB5x2AaiSSDO0/OskoCztDZBAAAAAADV1A4

Output /server/path?jREJBBB5x2AaiSSDO0%2FOskoCztDZBAAAAAADV1A4

Please note that in sample above there is no value defined for the parameter. This is how we receive from a Windows device, so we are suppose to proxy it as-is.

Please See Vertx issue for reference - https://github.com/eclipse/vert.x/issues/2544

Netty version

4.1.x

JVM version (e.g. java -version)

1.8_181

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
manish-panwarcommented, Aug 9, 2018

@arushi315 - Can you please look into Java 11?

0reactions
normanmaurercommented, Oct 11, 2019

Closing as it seems like this is not a bug

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should I encode names of parameters in a query string of a ...
Yes. Special characters in query strings have their special meaning anywhere in the query string. If the parameter name is foo=bar then ...
Read more >
Decode Querystring before ASM inspection DevCentral
As per rfc2396, the "=" character is reserved and should not be encoded when used as a delimiter between a parameter and it's...
Read more >
Query string parameters with "=" in the value
I'm trying to track the value of a query string parameter (in Adobe Analytics). It should be pretty simple, but the variable I've...
Read more >
HttpUrl - OkHttp - Square Open Source
This class offers methods to set the query as the single string, or as individual name-value parameters. With name-value parameters the values are...
Read more >
url-encode does not encode the '+' character - Google Groups
URL encode the parameter name and values according to the following rules: ... and technically shouldn't be encoded in most circumstances.
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