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 empty request body on retries with compression enabled #542

Closed
wants to merge 0 commits into from

Conversation

merlinz01
Copy link
Contributor

Description

Make the transport use a new reader for each retry when gzip compression is enabled.
Also be more explicit about doing so for non-compressed requests.
Test included.

Issues Resolved

Closes #541.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented May 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.96%. Comparing base (06a6dc8) to head (5258878).
Report is 22 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #542       +/-   ##
===========================================
+ Coverage   57.29%   67.96%   +10.67%     
===========================================
  Files         315      376       +61     
  Lines        9823     8853      -970     
===========================================
+ Hits         5628     6017      +389     
+ Misses       2902     1555     -1347     
+ Partials     1293     1281       -12     
Flag Coverage Δ
integration 60.39% <100.00%> (+9.55%) ⬆️
unit 15.28% <100.00%> (+2.43%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
opensearchtransport/opensearchtransport.go 86.63% <100.00%> (+1.47%) ⬆️

... and 272 files with indirect coverage changes

@merlinz01
Copy link
Contributor Author

I forgot to create a new branch for the PR. Please disregard.

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.

[BUG] Error http: ContentLength=401 with Body length 0
1 participant