liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 1b372bcb2b9461c71fbc04d780aa09061776df92
parent b84a6e0aa53fb0e17eabade7dd624b2090655eb0
Author: Daniel Barlow <dan@telent.net>
Date:   Wed, 15 Feb 2023 19:50:00 +0000

simpler eof handling

Diffstat:
Mpkgs/tufted/tufted.fnl | 10++--------
1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/pkgs/tufted/tufted.fnl b/pkgs/tufted/tufted.fnl @@ -33,15 +33,9 @@ (values (fn handler [reqlen] (let [bytes (f:read reqlen)] - (if eof? - false - bytes + (if bytes (values true bytes) - (do - ;; if the file length is divisible by the block - ;; length, need to send an empty block at eof - (set eof? true) - (values true ""))))) + (values false nil)))) size)) (error "host not allowed"))) nil