Try extension, then content-type when finding type