feat: add DisableHTTPFallback to respect explicit HTTP/1.1 configuration#529
Closed
hetbhatt2807 wants to merge 1 commit intoprojectdiscovery:mainfrom
Closed
feat: add DisableHTTPFallback to respect explicit HTTP/1.1 configuration#529hetbhatt2807 wants to merge 1 commit intoprojectdiscovery:mainfrom
hetbhatt2807 wants to merge 1 commit intoprojectdiscovery:mainfrom
Conversation
Neo - PR Security ReviewNo security issues found Highlights
Hardening Notes
Comment |
Mzack9999
requested changes
Mar 6, 2026
| Backoff Backoff | ||
|
|
||
| options Options | ||
| DisableHTTPFallback bool |
Member
There was a problem hiding this comment.
The code should be aligned to the left (if you use vscode or cursor it should automatically fmt on file save)
| if err != nil && stringsutil.ContainsAny(err.Error(), "net/http: HTTP/1.x transport connection broken: malformed HTTP version \"HTTP/2\"", "net/http: HTTP/1.x transport connection broken: malformed HTTP response") { | ||
| resp, err = c.HTTPClient2.Do(req.Request) | ||
| checkOK, checkErr = c.CheckRetry(req.Context(), resp, err) | ||
| if !c.DisableHTTPFallback && |
Member
There was a problem hiding this comment.
maybe we can control this at package level with something like:
var ENABLE_HTTP2 = true
with default value to true, so that users can disable it via code. What do you think?
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.