diff options
author | Eric Wong <e@80x24.org> | 2022-12-15 20:52:53 +0000 |
---|---|---|
committer | Eric Wong <mwrap-perl@80x24.org> | 2022-12-16 09:27:48 +0000 |
commit | dcafd48df9d57198943669412fcd98b9f958b3b7 (patch) | |
tree | 98e21c8a777b736df82528bfd34541aab19f0ab6 | |
parent | cf2e3db35163031206e94e9e76b23acc2136d1a1 (diff) | |
download | mwrap-dcafd48df9d57198943669412fcd98b9f958b3b7.tar.gz |
Better to have one implementation which works for all clients, since curl may not be as readily available as socat or a naive Perl socket implementation.
-rw-r--r-- | httpd.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 |