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 issue 185 - request cannot rewind during retry #186

Merged

Conversation

alvinlin123
Copy link
Collaborator

Issue #, if available:
#185

Description of changes:
Need to store the upstream request body into memory so we can retry in case of retriable networking error to down stream.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@alvinlin123 alvinlin123 changed the title Issue 185 request cannot rewind Fix issue 185 - request cannot rewind during retry Jan 25, 2024
@alvinlin123 alvinlin123 reopened this Jan 25, 2024
@alvinlin123
Copy link
Collaborator Author

Ack the CD failure. I will take a look soon.

@@ -222,15 +240,15 @@ func (p *ProxyClient) Do(req *http.Request) (*http.Response, error) {
}

if (p.LogFailedRequest || log.GetLevel() == log.DebugLevel) && resp.StatusCode >= 400 {
b, _ := ioutil.ReadAll(resp.Body)
b, _ := io.ReadAll(resp.Body)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is changed because ioutil pkg is deprecated after go 1.6

@alvinlin123 alvinlin123 merged commit 64c8f0b into awslabs:master Jan 26, 2024
1 check passed
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