Skip to content

fix(curl): Preserve Sentry rate-limit header values - #1279

Merged
szokeasaurusrex merged 2 commits into
masterfrom
szokeasaurusrex/fix-curl-rate-limits
Aug 4, 2026
Merged

szokeasaurusrex merged 2 commits into
masterfrom
szokeasaurusrex/fix-curl-rate-limits

Conversation

@szokeasaurusrex

@szokeasaurusrex szokeasaurusrex commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

Preserve the complete value of X-Sentry-Rate-Limits when parsing curl response headers. Previously, splitting on every colon discarded category and scope fields, so valid headers such as 120:error:project were not applied by RateLimiter and rate-limited error envelopes could continue to be sent.

This change also refactors to use eq_ignore_ascii_case rather than converting the headers to lowercase and comparing directly. eq_ignore_ascii_case avoids allocations and is therefore likely more performant.

Fixes #1111
Fixes RUST-209

Preserve the complete value of X-Sentry-Rate-Limits when parsing curl response headers. Previously, splitting on every colon discarded category and scope fields, so valid headers such as 120:error:project were not applied by RateLimiter and rate-limited error envelopes could continue to be sent.

Fixes [#1111](#1111)
Fixes [RUST-209](https://linear.app/getsentry/issue/RUST-209/fix-curl-transport-parsing-of-x-sentry-rate-limits-header)
@linear-code

linear-code Bot commented Aug 3, 2026

Copy link
Copy Markdown

RUST-209

@szokeasaurusrex
szokeasaurusrex marked this pull request as ready for review August 3, 2026 14:23
@szokeasaurusrex
szokeasaurusrex requested review from a team as code owners August 3, 2026 14:23
@szokeasaurusrex
szokeasaurusrex merged commit f0962ed into master Aug 4, 2026
31 checks passed
@szokeasaurusrex
szokeasaurusrex deleted the szokeasaurusrex/fix-curl-rate-limits branch August 4, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix curl transport parsing of X-Sentry-Rate-Limits header

2 participants