Skip Menu |

This queue is for tickets about the MIME-Lite CPAN distribution.

Report information
The Basics
Id: 49572
Status: open
Priority: 0/
Queue: MIME-Lite

People
Owner: Nobody in particular
Requestors: nate [...] summersault.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 3.025
Fixed in: (no value)



Subject: Improve MIME type detection
I noticed that when AUTO is specified as the Type of a message, only the string in $params{Path} is passed to MIME::Types from build(...). This prevents AUTO typing for messages (or more likely, attachments) built with either Data or FD instead of Path. Here is a simple patch that allows a fallback to $params{Filename}, which is easily passed in addition to FD or Data to build(...). ----------------------------------------------- 961c961 < elsif ($type eq 'AUTO') { $type = $self- Show quoted text
>suggest_type($params{Path}); }
--- Show quoted text
> elsif ($type eq 'AUTO') { $type = $self- >suggest_type($params{Path} || $params{Filename}); }