mhonarc-users

Re: mhexternal.pl and application/vnd.* MIME types

1996-09-27 08:32:50
I've never seen code that passes wildcards into arrays before like this
but purhaps perl is processing it somewhat like a regular expression.
In a regexp, a "." is used like the "?" is used in DOS DIR command (meaning
match any one character in this location).  If it is treating it like
a regexp then you might try escaping the "." so that perl knows to treat
it like a real ".".  I haven't tested this but you might try using somelike
like (the "\" is the standard perl escape):

    application/vnd\.ms-excel:m2h_external'filter:mhexternal.pl



mhonarc only handles wildcard definitions of the form (see mhreadmail.pl,
search 'MIMEFilter'):

   whatevertype/asubtype
   whatevertype/*

...
My current resource file reads:

  <mimefilters>
   ...
   application/vnd.ms-excel:m2h_external'filter:mhexternal.pl
   application/vnd.ms-powerpoint:m2h_external'filter:mhexternal.pl
   ...
   </mimefilters>

...

And this results in the "Could not process..." warning for me....
       Could not process part with given Content-Type:
application/vnd.ms-excel; name="idp97.xls" ;
       x-mac-type="584C5335" ; x-mac-creator="5843454C"

As a test, I edited all of the above instances to omit 'vnd.' and modified
my email client (Eudora) to
use 'application/ms-excel' instead;  worked fine.  (Unfortunately MIME
types are harder to standardize than define ;-)   So I assumed the culprit
was the '.' and started looking at the code in mhexternal.pl which parses
the content-type to see if it was parsing the above syntax correctly.
However if it worked for you without making the mods/patches to
mhexternal.pl, maybe I'm barking-up the wrong tree.

----------
 Chris Bagwell                          |     Alcatel Network Systems
 cbagwell(_at_)aud(_dot_)alcatel(_dot_)com              |        Richardson, 
Texas

<Prev in Thread] Current Thread [Next in Thread>