Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/custom-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@
},
"application/octet-stream": {
"compressible": false,
"extensions": ["buffer"],
"extensions": ["buffer", "ipa"],
"sources": [
"https://github.com/broofa/node-mime/blob/v1.2.11/types/mime.types#L154"
"https://github.com/broofa/node-mime/blob/v1.2.11/types/mime.types#L154",
"https://support.apple.com/en-gb/guide/deployment/depce7cefc4d/1/web#dep30d16db76"
]
},
"application/ogg": {
Expand Down Expand Up @@ -939,7 +940,8 @@
]
},
"text/xml": {
"compressible": true
"compressible": true,
"extensions": ["plist"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, actually I am not sure what the impact is of adding this extension here. I think this is incorrect, but would like more eyes here. Maybe I am missing something.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be safe to add it, this is the diff it makes:
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any precedent for this though. There are bunches of examples of files with custom extention's which are actually another format (xml, json, etc) that are not doing this. Why would we make a special case for this one?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello! If I may, I'd like to clarify my reasoning.

I've submitted this PR to request the inclusion of two MIME type linkages with their associated file extensions. However, I acknowledge that I'm not fully familiar with the project yet, and it's possible I may have implemented the changes incorrectly.

My intent is simply to publish some Apple iOS files on GitHub Pages, which uses db-mime. For more details on MIME types and their handling on GitHub Pages, you can refer to the official documentation here: GitHub Pages MIME Types.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, and based on the docs from apple, it looks like they should have used a suffix and a specific mime type, not call this a text/xml. That would have made it more clear to me what is going on, and you can see plenty of examples of this in our current dataset. For example:

  "application/atom+xml": {
    "source": "iana",
    "compressible": true,
    "extensions": ["atom"]
  },

It is clear to me that they have documented it this way, and that as long as we prefer the xml extension first that it should be alright to add for the use cases we have in the express project. That said, I am concerned enough with this that I would like to ping in @dougwilson and get his opinion. Maybe I am being overly concerned, but since I cannot find another example like this I want to be extra careful.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! I was reviewing another PR and I think this might be a similar case to this one:

  "application/octet-stream": {
    "source": "iana",
    "compressible": false,
    "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]
  },

As you can see here, lots of different extentions listed like you are adding to this one. I had been looking specifically at xml examples (and did a quick search for json when I couldn't find any xml ones) but this seems to me to be the same use case, and so sets the precident I was looking to find.

Copy link

@orionmind orionmind Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually blocked on this limitation while using GH Pages to serve manifest.plist files for OTA Ad-Hoc Distribution of iOS apps. The iOS user needs to hit a hyperlink using Apple's itms-services URL scheme (eg. itms-services://?action=download-manifest&url=https://myapp.com/manifest.plist).

Instead of an application/xml or text/xml content-type in the response, I'm seeing 'application/octet-stream' returned when this URL is visited, which makes the OTA Ad-Hoc installation fail.

Apple OTA(web) Ad-Hoc Distribution: https://support.apple.com/en-gu/guide/deployment/depce7cefc4d/web

},
"text/yaml": {
"compressible": true,
Expand Down