Commit 5bc9e07
committed
Fold only the canonical decimal form in coerce_request_id
coerce_request_id() coerced any string int() accepts back to an integer,
so non-canonical numeric strings that are distinct ids on the JSON-RPC wire
-- "007", "+7", "1_000", " 7 ", non-ASCII digit strings -- collapsed onto
the same integer correlation key as the value they happen to parse to. That
conflates ids the peer sent as genuinely different values in the shared
_pending / _in_flight / progress-token correlation domain.
Fold only when the string equals str(int(s)), the canonical form a JSON
serializer emits for an int, preserving the intended "peer stringified an
int id" correlation while leaving every other string a distinct id.1 parent d060b36 commit 5bc9e07
2 files changed
Lines changed: 30 additions & 2 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
64 | | - | |
| 70 | + | |
65 | 71 | | |
66 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
67 | 75 | | |
68 | 76 | | |
69 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2011 | 2011 | | |
2012 | 2012 | | |
2013 | 2013 | | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
2014 | 2034 | | |
2015 | 2035 | | |
2016 | 2036 | | |
| |||
0 commit comments