NuGet / Home

Repo for NuGet Client issues
Other
1.5k stars 252 forks source link

Misgeneration of content-type in `rels/.rels` #13853

Open joshudson opened 1 month ago

joshudson commented 1 month ago

NuGet Product Used

dotnet.exe

Product Version

8.0

Worked before?

No?

Impact

It bothers me. A fix would be nice

Repro Steps & Context

<Default Extension="png" ContentType="application/octet" />

No. I'm really certain this should be "image/png"

<Default Extension="dll" ContentType="application/octet" />

I'm confused here. Shouldn't that be "application/octet-stream"?

<Default Extension="nuspec" ContentType="application/octet" />

I suppose it could be right, but it doesn't look right.

<Override PartName="/LICENSE" ContentType="application/octet" />

No. should be "text"

Verbose Logs

dotnet pack -c Release

cat rels/.rels
jeffkl commented 1 month ago

@joshudson the MIME type application/octet is just a default that can be used to indicate that a file is not plain text. Its set here for all files.

Are you experiencing a problem that seems caused by MIME types? I'm not aware of any reports of issues around this area.

joshudson commented 1 month ago

application/octet is not in the mime type database. I think the author meant application/octet-stream but wrote it wrong. An octet is 8 bits, so a MIME type of application/octet would be a one byte file.

I can't use this file, and neither can anybody else. For it to be minimally usable, the icon needs to have the correct mime type, and so does the license file (including encoding).

I got here trying to figure out how to generate a .nupkg after dealing with other nonsensical problems, not all of them listed on github and trying to figure out why this stuff is wrong.