added content-length and connection keep-alive where lengths are known