The response socket, as mentioned above, is also used for reading the
request-body if the client provides one. For such purposes,
*htparser*(1) ensures that the reader sees end-of-file at the end of
-the request-body, so that the reader (unlike in, for example, CGI)
-does not have to worry about the Content-Length header and counting
-bytes when reading.
+the request-body, allowing the reader (unlike in, for example, CGI) to
+not have to worry about the Content-Length header and counting bytes
+when reading, and also to handle chunked request-bodies in a natural
+fashion.
To respond, the handler program needs to write an ordinary HTTP
response to the response socket. That is, one line containing the HTTP
following points are noteworthy:
* The HTTP version is actually ignored; it must simply be there for
- completeness.
+ completeness. For the sake of forward compatibility, however,
+ handlers should output "HTTP/1.1".
* In the header, Unix line endings are accepted; *htparser*(1) will
still use CRLF line endings when passing the response to the