aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/buffer.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-12-08 17:45:27 +0100
committerbptato <nincsnevem662@gmail.com>2024-12-08 18:10:28 +0100
commit8974f7deaaecd84b5f95e40bf935f735253521f3 (patch)
tree2ed5a61ba633dbae71596a85734f7ffe31576d3c /src/server/buffer.nim
parentf6f340bfaa65657e78f93adb1fa715261c466fbc (diff)
downloadchawan-8974f7deaaecd84b5f95e40bf935f735253521f3.tar.gz
response: simplify text()
It gets copied once anyway, so just use a blob. I guess I could skip the copy with some effort, but the 4 lines implementation is too attractive :P This is still an improvement, as it doesn't needlessly zero-fill the buffer on realloc. (I've also removed the final realloc from blob, as it seemed quite pointless. Using Content-Length could help... except it doesn't, because it refers to the encoded length. Ugh.)
Diffstat (limited to 'src/server/buffer.nim')
0 files changed, 0 insertions, 0 deletions