operator-framework / catalogd

On-cluster FBC catalog content server
Apache License 2.0
14 stars 31 forks source link

🌱 adding gzip content support #293

Closed grokspawn closed 3 months ago

grokspawn commented 3 months ago

This is an inexpensive-to-implement approach which takes no action (and incurs no cost) unless:

  1. the served content exceeds (a default) size of 1400 bytes; and
  2. the client indicates support for compressed streaming via request header "Accept-Encoding" set to "gzip"

It's possible that we may decide later to trade CPU load for disk space, once we get an opportunity to generate some benchmarks with this approach.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 33.12%. Comparing base (c0ed3fa) to head (7443661).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #293 +/- ## ======================================= Coverage 33.12% 33.12% ======================================= Files 15 15 Lines 646 646 ======================================= Hits 214 214 Misses 411 411 Partials 21 21 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

grokspawn commented 3 months ago

Found a more concise (and general) test approach, plus realized I'd omitted the status == 200 test accidentally. 🐑-ish