🐛 (catalogd) `serveJSON` lines instead of `http.serverContent` for no-params by anik120 · Pull Request #1725 · operator-framework/operator-controller

joelanford

@joelanford joelanford changed the title (catalogd) serveJSON lines instead of http.serverContent for no-params 🐛 (catalogd) serveJSON lines instead of http.serverContent for no-params

Feb 6, 2025

@anik120

…arams

The metas endpoint was using `serverJSONLines` for serving queries that are
parameterized, which copies content from a reader to the response writer under
the hood. As a result no-parameterized query responses don't have range request
support.

The endpoint was however using `http.ServeContent` for cases when no parameters
were provided, which does have range request support.

This PR switches the `http.ServeContent` out for `serveJSONLines` to make sure
metas endpoint is consistent in it's lack of support for range requests.

Signed-off-by: Anik Bhattacharjee <anbhatta@redhat.com>

joelanford

Merged via the queue into operator-framework:main with commit f6b1130

Feb 6, 2025

20 of 21 checks passed