You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consulting the spec to look for answers, but also creates more questions:
Meta characters such as ' should be escaped with a slash .
The way this is written implies multiple characters, but only one is given?
URL encode the value e.g. given /param first, that SHOULD become %2Fparam%20first
Escape meta-characters within the raw value; a single quote ' becomes '
This seems to make the Go/Javascript implementations correct. What threw me off initially as my language of choice (Ruby) already encoded ' as %27 so the second point seemed superfluous. Checking the other implementations, I notice that Javascript encodeURIComponent does not do the same as Ruby and leaves the ' intact... but it also begs the questions why this workaround and not have it URL encoded as well?
What I'd like to see:
A list of known URL encoding edge cases and their correct encoding form(s). There is already some listed in https://google.github.io/sqlcommenter/spec/#key-value-format but it contains a copy-paste error on the second row. I think the traceparent example and something like foo'bar are useful additions.
The unit tests and readme files for implementations in this repository all using at least this list of cases.
The text was updated successfully, but these errors were encountered:
I noticed a discrepancy how we go about URL encoding.
%
. This is mentioned nowhere in the specification.This results in three different results for the same traceparent example value of
congo=t61rcWkgMzE,rojo=00f067aa0ba902b7
:congo%%3Dt61rcWkgMzE%%2Crojo%%3D00f067aa0ba902b7
congo%3Dt61rcWkgMzE%2Crojo%3D00f067aa0ba902b7
rojo%253D00f067aa0ba902b7%2Ccongo%253Dt61rcWkgMzE
Consulting the spec to look for answers, but also creates more questions:
The way this is written implies multiple characters, but only one is given?
This seems to make the Go/Javascript implementations correct. What threw me off initially as my language of choice (Ruby) already encoded
'
as%27
so the second point seemed superfluous. Checking the other implementations, I notice that JavascriptencodeURIComponent
does not do the same as Ruby and leaves the'
intact... but it also begs the questions why this workaround and not have it URL encoded as well?What I'd like to see:
foo'bar
are useful additions.The text was updated successfully, but these errors were encountered: