Commit 3704215
fix(tracing): use locale-independent isalnum in baggage encoder
`isalnum` from `<ctype.h>` is locale-dependent: in non-"C" locales
(e.g. ISO-8859-1) bytes > 127 — such as UTF-8 continuation bytes in
release / environment values — can be classified as alphanumeric and
left unencoded, producing a malformed baggage header. RFC 3986's
`unreserved` set is strict ASCII by definition, so replace the call
with a small locale-independent ASCII-range helper.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 0a49a1e commit 3704215
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
| |||
21 | 28 | | |
22 | 29 | | |
23 | 30 | | |
24 | | - | |
| 31 | + | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
| |||
0 commit comments