Add Content-Length header, and fix Content-Type

It would be useful for the reference server to send a Content-Length header, so that clients could know in advance how much data to expect.  This suggested patch does that, and fixes the `text/text` content type to use the standard `text/plain` instead.

(This Content-Length would become incorrect if a later layer of the web server were to e.g. compress the data being sent back, but presumably such a layer would correct the Content-Length at the same time as it added a Content-Encoding header.)