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
{{ message }}
Repository navigation
Fix curl transport parsing of X-Sentry-Rate-Limits header #1111
The curl transport parses raw response header lines with data.split(':') and stores only the first segment after the header name. This truncates X-Sentry-Rate-Limits values, whose documented format is retry_after:categories:scope:reason_code:namespaces:.... For example, X-Sentry-Rate-Limits: 120:error:project is passed to RateLimiter::update_from_sentry_header as only 120, so the parser ignores it and the SDK does not apply the rate limit. Because the header variable is still Some, the current else if chain also skips Retry-After and bare 429 fallback handling. See curl.rs, ratelimit.rs, and the Sentry SDK rate limiting docs.
We should fix the curl header parsing to preserve the complete value after the first colon, for example with split_once(':') or splitn(2, ':'). We should also add a regression test that exercises a raw curl-style header line such as X-Sentry-Rate-Limits: 120:error:project and verifies that the complete value reaches the rate limiter. A small helper for parsing header lines would make this straightforward to unit test without requiring a curl-backed integration server.
Activity
linear-code commentedon May 5, 2026
RUST-209
fix(curl transport): Preserve full X-Sentry-Rate-Limits and Retry-Aft…
fix(curl): Preserve Sentry rate-limit header values (#1279)