Headers parser errors, fix

Fixed bug in headers parser whereby the parser wouldn't promptly catch the error
of a header name containing a newline character.