Skip to content

fix(transport): Restore reqwest protocol features#1258

Merged
lcian merged 1 commit into
masterfrom
fix/restore-reqwest-transport-features
Jul 22, 2026
Merged

fix(transport): Restore reqwest protocol features#1258
lcian merged 1 commit into
masterfrom
fix/restore-reqwest-transport-features

Conversation

@lcian

@lcian lcian commented Jul 22, 2026

Copy link
Copy Markdown
Member

In #998 we upgraded reqwest to 0.13.x.
We moved from reqwest/default-tls to reqwest/native-tls. The two features are not exactly equivalent, as the second one additionally enables ALPN.

Along with that, we enabled its http2 feature flag, which was not enabled by default in 0.12.x.
The original author of that PR enabled http2 as a doctest was failing.
Apparently it was failing due to this bug in reqwest seanmonstar/reqwest#2927, where enabling only ALPN but not HTTP2 would cause a runtime panic, as the client still advertised HTTP 2 even though it was compiled without support for it.

Enabling HTTP2 is not a problem for sentry itself, but it can be if an application crate uses reqwest (independently) + sentry, as upgrading sentry might silently enable HTTP2 on the unified reqwest dependency.

This PR restores the previous protocol feature set by selecting native-tls-no-alpn, and removing http2.
It also bumps reqwest to 0.13.2 to get the fix for the aforementioned bug in. Otherwise, if a user has exactly version 0.13.1 as a direct dependency, and enables ALPN but not HTTP2, the reqwest transport will run exactly into that bug, and panic.

Close #1057

@lcian
lcian force-pushed the fix/restore-reqwest-transport-features branch from 6adf8bd to 0500722 Compare July 22, 2026 13:48
@lcian lcian changed the title fix(transport): Restore reqwest protocol features fix(reqwest): Restore pre-upgrade protocol features Jul 22, 2026
@lcian
lcian marked this pull request as ready for review July 22, 2026 13:56
@lcian
lcian requested a review from a team as a code owner July 22, 2026 13:56
@lcian

This comment has been minimized.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 0500722. Configure here.

@lcian lcian changed the title fix(reqwest): Restore pre-upgrade protocol features fix(transport): Restore reqwest protocol features Jul 22, 2026
@lcian
lcian marked this pull request as draft July 22, 2026 14:18
@lcian
lcian marked this pull request as ready for review July 22, 2026 14:18
Use native TLS without ALPN and stop enabling HTTP/2 so the reqwest 0.13 transport retains the protocol behavior from reqwest 0.12.
@lcian
lcian force-pushed the fix/restore-reqwest-transport-features branch from 0500722 to 640f8c7 Compare July 22, 2026 15:02
@lcian

This comment has been minimized.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 640f8c7. Configure here.

@lcian
lcian merged commit 3cb81ac into master Jul 22, 2026
34 checks passed
@lcian
lcian deleted the fix/restore-reqwest-transport-features branch July 22, 2026 16:58
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.

Drop or pass through reqwest feature http2

2 participants