MIME header fields are case-insensitive. <sigh>
So replace some strstr() calls with either (new local function) strStartWith_i() or strcasestr(), depending. strStartWith_i() return length of the matched word, so no need to sprinkle about magic numeric constants everywhere. The extra calls to strlen() are worth the code clarity / reliability, methinks. TODO: find out if there's a way to calculate the length of string-constants at compile-time (?).
Showing with 28 additions and 18 deletions