Skip to content

fix(http): resolve effective upstream authorities - #448

Open
fhgffy wants to merge 1 commit into
nadoo:mainfrom
fhgffy:fix/http-target-authority
Open

fhgffy wants to merge 1 commit into
nadoo:mainfrom
fhgffy:fix/http-target-authority

Conversation

@fhgffy

@fhgffy fhgffy commented Oct 13, 2026

Copy link
Copy Markdown

Resolve the effective request authority before calculating the upstream address. Origin-form requests currently dial :80, while IPv6 literals without an explicit port omit the default port.

Keep the absolute URI intact while constructing the relative request URI, then join the resolved hostname and port. Regression cases cover hostname and IPv6 authorities, explicit and default ports, and both request-target forms.

Validation (Go 1.27.2, Windows/amd64): go test -p 1 ./... -count=1, go vet -p 1 ./..., and go build -p 1 ./....

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.

1 participant