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: pass bytes.Reader to http.Request, clean up pooledReader ourselves #159

Merged
merged 3 commits into from
Jan 5, 2022

Conversation

lizthegrey
Copy link
Member

Short description of the changes

@lizthegrey lizthegrey requested review from a team, ianwilkes and MikeGoldsmith January 4, 2022 20:58
Comment on lines 390 to 394
if reader, ok := reqBody.(*pooledReader); ok {
req, err = http.NewRequest("POST", url.String(), &reader.Reader)
} else {
req, err = http.NewRequest("POST", url.String(), reqBody)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this type switch necessary? You shouldn't need to pass the embedded Reader directly.

Copy link
Member Author

Choose a reason for hiding this comment

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

@lizthegrey lizthegrey added merge at will Reviewer can merge the PR once reviewed. version: bump patch A PR with release-worthy changes and is backwards-compatible. labels Jan 4, 2022
@lizthegrey
Copy link
Member Author

Leaving this for @MikeGoldsmith to pick up in his morning once he wakes up in about 12 hours!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge at will Reviewer can merge the PR once reviewed. version: bump patch A PR with release-worthy changes and is backwards-compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants