Case-sensitive header names, remove use of StringIO