From 3d9761876cd06bcaf27325ccd3391bdbf9725b10 Mon Sep 17 00:00:00 2001 From: Daniel Kennedy Date: Mon, 26 Jan 2026 14:42:27 -0500 Subject: [PATCH] Parse the mime type out of the content-type header Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../artifact/src/internal/download/download-artifact.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/artifact/src/internal/download/download-artifact.ts b/packages/artifact/src/internal/download/download-artifact.ts index 895ba14e..4a144974 100644 --- a/packages/artifact/src/internal/download/download-artifact.ts +++ b/packages/artifact/src/internal/download/download-artifact.ts @@ -80,10 +80,11 @@ export async function streamExtractExternal( } const contentType = response.message.headers['content-type'] || '' + const mimeType = contentType.split(';', 1)[0].trim().toLowerCase() const isZip = - contentType === 'application/zip' || - contentType === 'application/x-zip-compressed' || - contentType === 'zip' + mimeType === 'application/zip' || + mimeType === 'application/x-zip-compressed' || + mimeType === 'zip' // Extract filename from Content-Disposition header const contentDisposition =