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

Support all RFC3986 § 2.2 reserved characters and § 2.1 percent-encoding uppercase and lowercase #73

Open
shaunco opened this issue Sep 24, 2023 · 1 comment · May be fixed by #74
Open

Comments

@shaunco
Copy link

shaunco commented Sep 24, 2023

(originally written up as balena-io/pinejs#693, which was closed in favor of this)

RFC3986 section 2.2 Reserved Characters specifies that all of :/?#[]@*+,;= are reserved. The implementations of this in both the JavaScript encodeURIComponent and go's net/url package apply this pretty strictly. As such, this library should properly handle URI encoded forms of all OData expected characters - specifically, +/*,=;@:()'. Currently this library seems to only handle + and '. Note that ? and & can be ignored as they are only used in the URI query string parsing ?key=value&key=value and not expected in OData.

Additionally, RFC3986 section 2.1 Percent-Encoding says:

The uppercase hexadecimal digits 'A' through 'F' are equivalent to the lowercase digits 'a' through 'f', respectively.

So this library also needs to support both the uppercase and lowercase percent encoded forms.

shaunco added a commit to shaunco/odata-parser that referenced this issue Sep 24, 2023
and § 2.1 percent-encoding uppercase and lowercase

Resolves: balena-io-modules#73
Change-type: patch
@fisehara fisehara linked a pull request Jan 4, 2024 that will close this issue
@fisehara
Copy link
Contributor

fisehara commented Jan 9, 2024

@shaunco A naive implementation approach shows that adding branches to the parser will increase the parser execution time by >= 10% and as of now, we cannot dedicate more resources on complete refactoring the odata-parser to

  1. be in parity with OData and RFC3986
  2. keep performance as it's the most loaded / executed module in pinejs stack.

Postponing the work for now, the issue remains valid.

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