The extension -> MIME type routine uses lots of constant strings which end up in the RODATA segment of RAM. Refactor the comparison to use a table of strings stored in PMMEM instead, freeing ~370 bytes for the heap.