Repository navigation
fix: preserve digest auth on HTTP/2 fallback, apply dialer opts, and format doc.go - #606
Closed
TassioSales wants to merge 1 commit into
Closed
TassioSales wants to merge 1 commit into
TassioSales wants to merge 1 commit into
Conversation
…format doc.go - Wrap HTTPClient2 request with digest transport when DigestAuth is configured (fixes projectdiscovery#601) - Pass configured opts to fastdialer.NewDialer in getFastDialer (fixes projectdiscovery#602) - Add missing trailing newline to doc.go (fixes projectdiscovery#603) - Add unit test TestDoHTTP2FallbackPreservesDigestAuth
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.
Fixes #601
Fixes #602
Fixes #603
Summary
This PR addresses three fixes across
retryablehttp-go:DigestAuthtriggered the HTTP/2 fallback inDo, the retry was executed directly viaHTTPClient2.Do(req.Request)without wrapping indac.Transport, stripping authorization headers and returning401 Unauthorized. It is now properly wrapped indac.NewTransportusingHTTPClient2.getFastDialerignores itsCacheTypeoverride #602):getFastDialersetopts.CacheType = fastdialer.Memoryonopts, but passedfastdialer.DefaultOptionsinstead ofoptstofastdialer.NewDialer. It now correctly passesopts.doc.go(doc.gois not gofmt-formatted #603): Added the missing trailing newline todoc.gosogofmt -l .succeeds cleanly.Testing
TestDoHTTP2FallbackPreservesDigestAuthindo_http2_fallback_test.goverifying that HTTP/2 fallback preserves digest credentials and succeeds.go test -v ./....gofmt -l doc.goreturns no formatting diffs.