http newline counting fix for header parsing state