This changes the doWithRetries to return a cleanup func to be called once the response is read instead of taking it down prematurely. Also, and maybe more importantly: Report network errors instead of silently ignoring them and processing partial data.
This becomes an issue with large requests where there's a packet boundary between received headers and rest of the body.
Fixes #363
Type of PR
[x] Bug Fix (non-breaking fixes to existing functionality)
[x] Test Updates
Test Information
[x] My PR required test updates
Go Version: 1.20.3
Os Version: macOS Ventura 13.2.1
OpenAPI Spec Version: 2.15.0
Signoff
[x] I have submitted a CLA for this PR
[x] Each commit message explains what the commit does
[ ] I have updated documentation to explain what my PR does
[x] My code is covered by tests if required
[x] I ran make fmt on my code
[x] I did not edit any automatically generated files
Summary
This changes the doWithRetries to return a cleanup func to be called once the response is read instead of taking it down prematurely. Also, and maybe more importantly: Report network errors instead of silently ignoring them and processing partial data.
This becomes an issue with large requests where there's a packet boundary between received headers and rest of the body.
Fixes #363
Type of PR
Test Information
Go Version: 1.20.3 Os Version: macOS Ventura 13.2.1 OpenAPI Spec Version: 2.15.0
Signoff
make fmt
on my code