and send Content-Length. Also includes some testing of the server code. R=rsc CC=golang-dev https://golang.org/cl/2831041