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

Use http.ErrUseLastResponse for default redirect handling #7

Merged
merged 2 commits into from
Jun 5, 2023

Conversation

jhump
Copy link
Member

@jhump jhump commented Jun 5, 2023

Instead of failing the request on a redirect, we can just let the caller see the redirect response. This is what is actually recommended in Connect docs here.

@jhump jhump requested a review from jchadwick-buf June 5, 2023 16:29
Copy link
Member

@jchadwick-buf jchadwick-buf left a comment

Choose a reason for hiding this comment

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

Nice, LGTM. Looks like we can delete errNoRedirects now too.

@jhump jhump enabled auto-merge (squash) June 5, 2023 17:59
@jhump jhump merged commit a4fa5be into main Jun 5, 2023
@jhump jhump deleted the jh/use-last-response branch June 5, 2023 18:01
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