about summary refs log tree commit homepage
path: root/lib/PublicInbox/WwwStatic.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-01-24 09:43:51 +0000
committerEric Wong <e@yhbt.net>2020-01-25 19:21:36 +0000
commitaaf85aef560bc828b6e0fedb5a7632e8c47d7228 (patch)
treea7823e8f48b86425db2892015602d54804ef2be6 /lib/PublicInbox/WwwStatic.pm
parentb99e2465205a8f27801066b1e914bd4091406fa2 (diff)
downloadpublic-inbox-aaf85aef560bc828b6e0fedb5a7632e8c47d7228.tar.gz
We want to be able to inject existing file handles + offsets and
even lengths into this in the future, without going through the
->getline interface[1]

We also switch to using a 64K buffer size since we can safely
discard whatever got truncated on write and full writes can help
negotiate a larger TCP window for high-latency, high-bandwidth
links.

While we're at it, make it obvious that we're using O_APPEND for
our tmpfile() interface so we can seek freely for reading while
the writer always prints to the end of the file.

[1] the getline interface for serving static files may result
    in us buffering on-FS data into another temporary file,
    which is a waste.
Diffstat (limited to 'lib/PublicInbox/WwwStatic.pm')
0 files changed, 0 insertions, 0 deletions