fix http header processing to include newline

The code was there to add the newline but the first variable
was never set to false after the first iteration.