Skip to content

Add DisableHTTP2Fallback option - #522

Closed
MAVRICK-1 wants to merge 1 commit into
projectdiscovery:mainfrom
MAVRICK-1:fix/disable-http2-fallback
Closed

MAVRICK-1 wants to merge 1 commit into
projectdiscovery:mainfrom
MAVRICK-1:fix/disable-http2-fallback

Conversation

@MAVRICK-1

Copy link
Copy Markdown

When using httpx with -pr http11, users expect strict HTTP/1.1 mode. But the automatic HTTP/2 fallback bypasses this.

Changes

  • Added DisableHTTP2Fallback bool to Options struct
  • Wrapped fallback logic to respect this setting

Usage

options := retryablehttp.DefaultOptionsSpraying
options.DisableHTTP2Fallback = true
client := retryablehttp.NewClient(options)

Related: projectdiscovery/httpx#2240

@Mzack9999

Copy link
Copy Markdown
Member

The underlying issue (httpx#2240) has been resolved at the httpx level — the HTTP/1.1 protocol preference is now correctly enforced without requiring changes to retryablehttp-go. Closing as the original bounty issue is already complete. Thanks for the contribution.

@Mzack9999 Mzack9999 closed this Mar 22, 2026
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.

2 participants