Skip to content

BodyLimit middleware: (r *limitedReader) Reset does not reset read counter #1085

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

Merged
merged 1 commit into from
Mar 16, 2018
Merged

BodyLimit middleware: (r *limitedReader) Reset does not reset read counter #1085

merged 1 commit into from
Mar 16, 2018

Conversation

florianholzapfel
Copy link
Contributor

The limitedReader in the body limit middleware does not reset its read counter when calling the Reset method.

This PR fixes this and also adds a test for this case.

@codecov
Copy link

codecov bot commented Mar 15, 2018

Codecov Report

Merging #1085 into master will increase coverage by 0.11%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1085      +/-   ##
==========================================
+ Coverage   80.86%   80.98%   +0.11%     
==========================================
  Files          27       27              
  Lines        1892     1893       +1     
==========================================
+ Hits         1530     1533       +3     
+ Misses        254      253       -1     
+ Partials      108      107       -1
Impacted Files Coverage Δ
middleware/body_limit.go 80.48% <100%> (+5.48%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9da3f1...c03775b. Read the comment docs.

@vishr vishr merged commit 9aafcaf into labstack:master Mar 16, 2018
@vishr
Copy link
Member

vishr commented Mar 16, 2018

@florianholzapfel thanks for your contribution 🎉

@florianholzapfel
Copy link
Contributor Author

thank you for this awesome project!

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