From 9a08b126dd73d68a082f29fd8b110f8a8cceebfd Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Mon, 30 Mar 2026 04:22:55 +0100 Subject: [PATCH] appview/repo: avoid copying body in blob responses Signed-off-by: oppiliappan --- appview/repo/blob.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appview/repo/blob.go b/appview/repo/blob.go index c7fd680c..a3564a7c 100644 --- a/appview/repo/blob.go +++ b/appview/repo/blob.go @@ -181,8 +181,8 @@ func (rp *Repo) RepoBlobRaw(w http.ResponseWriter, r *http.Request) { if resp.StatusCode != http.StatusOK { l.Error("knotserver returned non-OK status for raw blob", "url", blobURL, "statuscode", resp.StatusCode) + w.Header().Set("Content-Type", "text/plain; charset=utf-8") w.WriteHeader(resp.StatusCode) - _, _ = io.Copy(w, resp.Body) return } -- 2.51.2