]> git.ipfire.org Git - pbs.git/commitdiff
api: debuginfo: Send the same headers as for regular downloads
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Jul 2025 15:07:01 +0000 (15:07 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Jul 2025 15:07:01 +0000 (15:07 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/api/debuginfo.py

index 8badcc9eebba919bc14d72934929efbfa31c5c22..c60df1afeee48fe0d2c6540bc608474d6a3bba36 100644 (file)
@@ -37,10 +37,5 @@ async def get(buildid: str) -> fastapi.responses.StreamingResponse:
        if not file:
                raise fastapi.HTTPException(404, "Could not find debuginfo in %s" % package)
 
-       headers = {
-               # XXX This should set Content-Length
-               "Content-Type" : file.mimetype or "application/octet-stream",
-       }
-
        # Stream the payload
-       return fastapi.responses.StreamingResponse(file.stream(), headers=headers)
+       return fastapi.responses.StreamingResponse(file.stream(), headers=file.headers)