From 8e35eaecbb2baaf9a4043263fc5e054f21aa24c6 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Mon, 5 Apr 2021 01:56:54 +0200 Subject: server: fix binary file output (previously, it tried to use ascii encoding and would fail) --- server/server.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server') diff --git a/server/server.scm b/server/server.scm index 5159314..751ef01 100644 --- a/server/server.scm +++ b/server/server.scm @@ -7,7 +7,8 @@ (use-modules (ice-9 format) (ice-9 textual-ports) (ice-9 iconv) - (ice-9 match)) + (ice-9 match) + (ice-9 binary-ports)) (define (get-path request) @@ -76,7 +77,7 @@ (number->string (hash body 10000000000)) ".age") (lambda (port) (display "(encrypted)\n") - (display (bytevector->string body "ascii") port)))) + (put-bytevector port body)))) ((text/plain) (call-with-append-file (string-append survey ".survey") (lambda (port) -- cgit v1.2.3