Decode URL-encoded headers in environment vars by mattoberle · Pull Request #2312 · open-telemetry/opentelemetry-python
requested a review
from a team
Unquoting header keys and values **after** calling `str.strip()` opened
the possibility for user encoding errors where a header contained
invalid whitespace. Unquoting **before** `str.strip()` aligns
`opentelemetry-python` with other `opentelemetry-{lang}` libraries that
implemenent URL decoding.
The HTTP exporter allows headers to be provided as `Dict[str, str]`. The gRPC exporter required headers to be `Sequence[Tuple[str, str]]`. This commit enables the `Dict[str, str]` format for gRPC.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters