diff --git a/catalogd/internal/storage/localdir.go b/catalogd/internal/storage/localdir.go index 87558a6ba..baadbf7ef 100644 --- a/catalogd/internal/storage/localdir.go +++ b/catalogd/internal/storage/localdir.go @@ -210,13 +210,8 @@ func (s *LocalDirV1) handleV1All(w http.ResponseWriter, r *http.Request) { defer s.m.RUnlock() catalog := r.PathValue("catalog") - catalogFile, catalogStat, err := s.catalogData(catalog) - if err != nil { - httpError(w, err) - return - } w.Header().Add("Content-Type", "application/jsonl") - http.ServeContent(w, r, "", catalogStat.ModTime(), catalogFile) + http.ServeFile(w, r, catalogFilePath(s.catalogDir(catalog))) } func (s *LocalDirV1) handleV1Query(w http.ResponseWriter, r *http.Request) { diff --git a/catalogd/internal/storage/localdir_test.go b/catalogd/internal/storage/localdir_test.go index 78b8c6c04..131d097ed 100644 --- a/catalogd/internal/storage/localdir_test.go +++ b/catalogd/internal/storage/localdir_test.go @@ -238,7 +238,7 @@ func TestLocalDirServerHandler(t *testing.T) { { name: "Server returns 404 when non-existent catalog is queried", expectedStatusCode: http.StatusNotFound, - expectedContent: "404 Not Found", + expectedContent: "404 page not found", URLPath: "/catalogs/non-existent-catalog/api/v1/all", }, {