about summary refs log tree commit homepage
path: root/httpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'httpd.h')
-rw-r--r--httpd.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/httpd.h b/httpd.h
index 4864e72..58db400 100644
--- a/httpd.h
+++ b/httpd.h
@@ -8,6 +8,15 @@
  *
  * stdio (via open_memstream) is used for all vector management,
  * thus everything is a `FILE *'
+ *
+ * Buffering is naive: write in full to a memstream to get an accurate
+ * Content-Length, then write out the header and sendmsg it off.
+ * I'm avoiding a streaming + lazy buffering design based on fopencookie(3)
+ * since that adds more complexity and uses icache.
+ * Supporting gzip would be nice, but linking zlib is not an option since
+ * there's a risk of conflicts if the application links against a different
+ * zlib version.  posix_spawn+gzip isn't an option, either, since we don't
+ * want to generate intrusive SIGCHLD.
  */
 #ifndef _DEFAULT_SOURCE
 #        define _DEFAULT_SOURCE