Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ldemailly
Copy link
Member

@ldemailly ldemailly commented Apr 18, 2025

Fixes #1038

Note tested with h2life but would be better to test... here too Added test

@ldemailly ldemailly requested review from asha-oss and Copilot April 18, 2025 02:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a missing Flush() method to the GzipResponseWriter to ensure proper flushing of gzip-compressed and HTTP responses.

  • Added a new Flush() method that calls both the gzip writer's Flush() and, if available, the underlying ResponseWriter's Flush().
  • Addresses issue #1038 by extending the flusher interface implementation.
Comments suppressed due to low confidence (1)

fhttp/http_utils.go:529

  • Consider adding tests for the Flush() method to confirm that both the gzip writer and the underlying ResponseWriter (if it implements http.Flusher) are flushed properly.
// Flush so this is a flusher.

@codecov
Copy link

codecov bot commented Apr 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.0%. Comparing base (f984aaf) to head (7798db0).
Report is 1 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1039   +/-   ##
======================================
  Coverage    74.0%   74.0%           
======================================
  Files          26      26           
  Lines        6398    6403    +5     
======================================
+ Hits         4736    4741    +5     
  Misses       1477    1477           
  Partials      185     185           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ldemailly ldemailly merged commit 23bcb77 into master Apr 18, 2025
14 of 15 checks passed
@ldemailly ldemailly deleted the gzip_flush branch April 18, 2025 03:06
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.

fhttp.Gzip() middleware doesn't implement Flush

3 participants