Better case insensative handling of content type detection based on headers thanks to diegito. Closes #56