1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-01-05 22:54:18 +02:00
opentelemetry-go/baggage
Nathan J Mehl bdb9322ebd
Use url.PathUnescape rather than url.QueryUnescape in baggage parsing (#4667)
* Use url.PathUnescape rather than url.QueryUnescape

I believe this addresses the majority of the cases described in
https://github.com/open-telemetry/opentelemetry-go/issues/3601

Golang's url.QueryUnescape will render url _path_ elements (e.g. /, +)
as spaces: `foo+bar` is rendered as `foo bar`.  Path elements are (as I
read the spec) legal W3C baggage values, and replacing them with spaces
fails the value validation regex.

url.PathEscape allows path elements through unmolested.

Signed-off-by: Nathan J. Mehl <n@oden.io>

* Update CHANGELOG.md

address comments

Co-authored-by: Robert Pająk <pellared@hotmail.com>

---------

Signed-off-by: Nathan J. Mehl <n@oden.io>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-10-31 15:02:17 -07:00
..
baggage_test.go Use url.PathUnescape rather than url.QueryUnescape in baggage parsing (#4667) 2023-10-31 15:02:17 -07:00
baggage.go Use url.PathUnescape rather than url.QueryUnescape in baggage parsing (#4667) 2023-10-31 15:02:17 -07:00
context_test.go Add baggage implementation based on the W3C and OpenTelemetry specification (#1967) 2021-06-08 08:06:37 -07:00
context.go Replaces golint by revive and fix newly reported linter issues (#1946) 2021-06-08 10:10:01 -07:00
doc.go Prerelease v1.0.0 (#2250) 2021-09-20 13:02:46 -07:00