fix the location of HTTP Connection Header

'Connection: close' was appended after '\r\n\r\n'. So I fix that it is
before '\r\n\r\n'.
Also, remove duplicated Connection header in case that a client sends
Connection header.
robustly receive HTTP content body for buggy clients