diff options
| author | bptato <nincsnevem662@gmail.com> | 2024-12-08 17:45:27 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2024-12-08 18:10:28 +0100 |
| commit | 8974f7deaaecd84b5f95e40bf935f735253521f3 (patch) | |
| tree | 2ed5a61ba633dbae71596a85734f7ffe31576d3c /src/server/buffer.nim | |
| parent | f6f340bfaa65657e78f93adb1fa715261c466fbc (diff) | |
| download | chawan-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