Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

TIdMimeTable can't handle duplicate file extensions to different media types #485

Open
rlebeau opened this issue Jun 21, 2023 · 1 comment
Labels
Element: MIME Issues related to MIME handling Status: Review Needed Issue needs further review to decide next status Type: Maintenance Issue is proposing maintenance of existing code

Comments

@rlebeau
Copy link
Member

rlebeau commented Jun 21, 2023

TIdMimeTable.BuildDefaultCache() calls FillMimeTable() to fill a local TStringList with default extensions and mime types. There are multiple duplicate extensions in this list, specifically:

.asf=video/x-ms-asf
.asf=application/vnd.ms-asf

.asx=video/x-ms-asf
.asx=video/x-ms-asf-plugin

.cpt=application/mac-compactpro
.cpt=image/x-corelphotopaint

.m3u=audio/mpegurl
.m3u=audio/x-mpegurl

.mp2=audio/x-mpg
.mp2=video/mpeg

.mp3=audio/x-mpg
.mp3=video/mpeg

.rdf=application/rdf+xml twice

.rm=application/vnd.rn-realmedia
.rm=audio/x-pn-realaudio

.rss=application/rss+xml twice

.wbmp=image/vnd.wap.wbmp twice

.xml=text/xml twice

Multiple media types can be mapped to the same file extension, but a file extension can't be mapped to multiple media types. So TIdMimeTable needs to be updated to handle this better.

@rlebeau rlebeau added Type: Bug Issue is a bug in existing code Status: Accepted Issue has been accepted to be worked on Type: Maintenance Issue is proposing maintenance of existing code labels Jun 21, 2023
@rlebeau rlebeau added this to the Indy 11 - Maintenance Release milestone Jun 21, 2023
@rlebeau rlebeau added Element: MIME Issues related to MIME handling Status: Review Needed Issue needs further review to decide next status and removed Status: Accepted Issue has been accepted to be worked on Type: Bug Issue is a bug in existing code labels Jun 21, 2023
@rlebeau
Copy link
Member Author

rlebeau commented Jun 21, 2023

Related: #238

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Element: MIME Issues related to MIME handling Status: Review Needed Issue needs further review to decide next status Type: Maintenance Issue is proposing maintenance of existing code
Projects
None yet
Development

No branches or pull requests

1 participant