Simplify header printing.
Be more tolerant of missing carriage returns.
Handle HTTP/1.0 servers (Connection: close).

Without a Content-Length header, json-rpc would wait forever.