Mime types inconsistent in artifacts api

Hi,

I thought I could use the artifact api in a consistent way to get files from either job runs or the last job run on the main branch.

However, I realized that somehow they return different headers.

/api/v4/projects/171584/jobs/artifacts/main/raw/index.html?job=build-pages

tags everything content-type: application/octet-stream

while

/api/v4/projects/171584/jobs/1132037/artifacts/index.html

gives the correct mime type.

Is this a bug or a feature? Is there any way to get consistent behaviour (ideally correct mime-types)

Best

Till