in reply to Re: Comparing different MIME type checking modules
in thread Comparing different MIME type checking modules
I agree that every email client has its own system for adding the "Type" header but what shook me was the fact that if I were to write a perl program which scans through an email and says whether it contains a .gz file or not, I would rely on the 'Content-type' header and I would probably search for 'application/x-gzip'.
Now, if the sender has created the mail using File::MimeInfo then my program would say there is no .gz file in the mail as it could not find 'application/x-gzip' because the 'Content-type' header was 'application/x-compressed-tar'. My best bet in this case would be to know the different 'Content-type' headers for .gz file and match against each of them i.e. match against application /x-gzip, if that fails match against applicatio/x-compressed-tar, If that fails maybe assume its not a .gz file.
|
---|