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

Fixed a problem that returned wrong content-encoding when the gzip co… #1921

Merged
merged 4 commits into from
Dec 15, 2021

Conversation

orisano
Copy link
Contributor

@orisano orisano commented Jul 14, 2021

I fixed a problem that returned wrong content-encoding when the gzip compressed content was empty.

gzip.Writer writes a gzip header if Write is called even once, and does not return the length of the header.
we need to record the Write call and make sure that the gzip header is written.

@codecov
Copy link

codecov bot commented Jul 28, 2021

Codecov Report

Merging #1921 (73a266d) into master (58366f9) will increase coverage by 0.35%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1921      +/-   ##
==========================================
+ Coverage   90.97%   91.33%   +0.35%     
==========================================
  Files          32       33       +1     
  Lines        2792     2872      +80     
==========================================
+ Hits         2540     2623      +83     
+ Misses        161      159       -2     
+ Partials       91       90       -1     
Impacted Files Coverage Δ
middleware/compress.go 84.00% <100.00%> (-0.32%) ⬇️
middleware/jwt.go 90.26% <0.00%> (ø)
middleware/timeout.go 100.00% <0.00%> (ø)
middleware/rate_limiter.go 100.00% <0.00%> (ø)
middleware/request_logger.go 97.59% <0.00%> (ø)
router.go 95.72% <0.00%> (+0.02%) ⬆️
echo.go 94.15% <0.00%> (+0.32%) ⬆️
middleware/key_auth.go 96.92% <0.00%> (+0.37%) ⬆️
middleware/request_id.go 85.71% <0.00%> (+1.50%) ⬆️
middleware/decompress.go 96.29% <0.00%> (+7.92%) ⬆️

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 58366f9...73a266d. Read the comment docs.

@orisano
Copy link
Contributor Author

orisano commented Nov 11, 2021

what is the status of this pr? @aldas

middleware/compress.go Outdated Show resolved Hide resolved
@orisano
Copy link
Contributor Author

orisano commented Dec 14, 2021

ping @aldas

Copy link
Contributor

@aldas aldas left a comment

Choose a reason for hiding this comment

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

LGTM, sorry for delay, these Github messages get sometimes buried in my mailbox

@aldas aldas merged commit 7bde9ae into labstack:master Dec 15, 2021
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