AWS.MIME.Load is supposed to read "the common standard format used by Apache mime.types", according to the comment in aws-mime.ads. That format includes comments that programs are supposed to ignore. AWS.MIME.Load reads the comments as a content type called "#" with many associated filename suffixes.
Here's a simple reproducer:
with AWS.MIME, Ada.Text_IO;
procedure Reproducer is
Example : constant String := "filename.is";
begin
AWS.MIME.Load("/etc/mime.types");
Ada.Text_IO.Put_Line('"' & Example & """ translates to """ &
AWS.MIME.Content_Type(Example) & """.");
end Reproducer;
Let the reproducer read the mime.types distributed with Apache HTTPD, or one of the copies distributed with AWS, or /etc/mime.types in the mailcap package in Fedora, RHEL and others, or /etc/mime.types in the media-types package in Debian. All of them contain the word "is", so the output will be:
"filename.is" translates to "#".
Correct output would be:
"filename.is" translates to "application/octet-stream".
AWS.MIME.Load is supposed to read "the common standard format used by Apache mime.types", according to the comment in aws-mime.ads. That format includes comments that programs are supposed to ignore. AWS.MIME.Load reads the comments as a content type called "#" with many associated filename suffixes.
Here's a simple reproducer:
Let the reproducer read the mime.types distributed with Apache HTTPD, or one of the copies distributed with AWS, or
/etc/mime.types
in the mailcap package in Fedora, RHEL and others, or/etc/mime.types
in the media-types package in Debian. All of them contain the word "is", so the output will be:"filename.is" translates to "#".
Correct output would be:
"filename.is" translates to "application/octet-stream".