etc: Add environment option to run init.d/ashd silently.
[ashd.git] / doc / ashd.doc
index eb081b7..16030a8 100644 (file)
@@ -15,9 +15,9 @@ technically. If you want a brief overview, please see the homepage at
 The basic premise of ashd is that of standard Unix philosophy; it
 consists of a number of different programs, each specialized to one
 precise task, passing HTTP requests around to each other in a manner
-akin to standard Unix pipelines. This document describes the protocols
-and conventions used between such programs that allows them to
-interoperate.
+akin to standard Unix pipelines. This document describes the set of
+protocols and conventions used between such programs that allows them
+to interoperate.
 
 REQUESTS
 --------
@@ -88,7 +88,8 @@ write such programs. The *htparser*(1) program will only start a
 persistent program as the root handler.
 
 A persistent handler program, when started, is passed a Unix socket of
-SEQPACKET type on standard input. Its parent program will then pass
+SEQPACKET type on standard input (while standard output and error are
+inherited from the parent process). Its parent program will then pass
 one datagram per request on that socket, containing the above listed
 parts of the request using the datagram format described below. By
 convention, the handler program should exit normally if it receives
@@ -109,9 +110,10 @@ variable called `HTTP_VERSION`. It is passed in full; i.e. as
 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
@@ -122,7 +124,8 @@ document of detailing the exact format of such a response, but the
 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