On Fri, 22 Jun 2012, Doug wrote:
Are the mime-type patterns ANDed or ORed?
Depends how you write them!
This is an and:
<match value="7z" type="string" offset="0:1" >
<match value="0xBCAF271C" type="string" offset="2:5" />
</match>
This is an or:
<match value="Documento\ Microsoft\ Word\ 6" type="string" offset="2080"/>
<match value="MSWordDoc" type="string" offset="2112"/>
If I have a glob and a magic pattern, does it require both in order to
match on the type? Will one or the other work and which takes
precedence? If I list a glob pattern first and it does not match (i.e.
mis-labeled file), will it still check for the magic?
It's a little complicated. If the magic matches, then that'll be used, but
the glob can specialise. If no magic matches, then only the glob is used
Taking these fake examples
application/test *.test bytes1-4=TEST
application/test2 extends /test *.test2
application/test3 *.test3
TEST called foo.test -> application/test
TEST called foo.test2 -> application/test2
TEST called foo.test3 -> application/test (test3 is wrong hierarchy)
RANDOM called foo.test3 -> application/test3 (no magic, only glob)
Nick