end | end | ||||
end | end | ||||
-- Content type stuff | |||||
if (mtype == 'text' or mtype == 'application') and (msubtype == 'html' or msubtype == 'xhtml+xml') then | if (mtype == 'text' or mtype == 'application') and (msubtype == 'html' or msubtype == 'xhtml+xml') then | ||||
return 'html',21 | return 'html',21 | ||||
end | end | ||||
-- Extension stuff | |||||
local fname = part:get_filename() | |||||
if fname and fname:match('html?$') then | |||||
return 'html',21 | |||||
end | |||||
return 'txt',40 | return 'txt',40 | ||||
end | end | ||||
end | end |