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

remove manual gzipping of request, as it's done automatically! #383

Merged
merged 1 commit into from
Oct 22, 2022

Conversation

metachris
Copy link
Collaborator

📝 Summary

Fixes #365 and replaces #382

http.Request automatically adds Accept-Encoding: gzip header and transparently decompresses the response. You can see this working in the test in this PR. Also see https://pkg.go.dev/net/http#Response.Uncompressed

But when the header is set manually, then it won't decode the response automatically, which is what we're seeing in #382

In fact, gzip was already support since the very beginning of mev-boost. :)


✅ I have run these commands

  • make lint
  • make test-race
  • go mod tidy

@metachris metachris mentioned this pull request Oct 21, 2022
3 tasks
@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2022

Codecov Report

Merging #383 (482c050) into main (1a11894) will increase coverage by 0.63%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #383      +/-   ##
==========================================
+ Coverage   66.02%   66.66%   +0.63%     
==========================================
  Files           7        7              
  Lines         889      888       -1     
==========================================
+ Hits          587      592       +5     
+ Misses        265      262       -3     
+ Partials       37       34       -3     
Flag Coverage Δ
unittests 66.66% <ø> (+0.63%) ⬆️

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

Impacted Files Coverage Δ
server/utils.go 75.67% <ø> (-0.33%) ⬇️
server/service.go 79.28% <0.00%> (+1.42%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@metachris
Copy link
Collaborator Author

Merging this quickly because getPayload on the main branch is currently broken

@metachris metachris merged commit c2be83e into main Oct 22, 2022
@metachris metachris deleted the gzip-fix2 branch October 22, 2022 07:47
screwyprof pushed a commit to screwyprof/mev-boost that referenced this pull request Feb 3, 2023
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.

None yet

2 participants