Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use transport for regular HTTP proxying #79

Merged
merged 2 commits into from
Sep 28, 2023
Merged

fix: use transport for regular HTTP proxying #79

merged 2 commits into from
Sep 28, 2023

Conversation

fortuna
Copy link
Contributor

@fortuna fortuna commented Sep 26, 2023

It was going directly for HTTP requests before.

@fortuna fortuna requested a review from jyyi1 September 26, 2023 20:50
Copy link
Contributor

@jyyi1 jyyi1 left a comment

Choose a reason for hiding this comment

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

LGTM, but suggests the PR title to be more specific, maybe sth like "fix: make sure x/httpproxy only forwards TCP request"?

}
http.Error(proxyResp, "Not Found", http.StatusNotFound)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit it's a little bit weird that the normal path resulted in an error, maybe "early return" the Not Found first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem is that we have two normal paths and one error, which is a fallback from the other two, so we can't do it first.

@fortuna fortuna changed the title Fix HTTP proxy handler fix: use transport for regular HTTP proxying Sep 28, 2023
@fortuna fortuna merged commit b950bdb into main Sep 28, 2023
6 checks passed
@fortuna fortuna deleted the fortuna-fix branch October 24, 2023 01:08
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