From 8fcaa908256f773280d61a703d980b5f5d352815 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Sun, 6 Oct 2019 12:28:58 -0400 Subject: [PATCH] another musl try --- cgi.d | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/cgi.d b/cgi.d index 3d29284..7a05229 100644 --- a/cgi.d +++ b/cgi.d @@ -2104,13 +2104,24 @@ class Cgi { foreach(h; hd) { if(rawDataOutput !is null) rawDataOutput(cast(const(ubyte)[]) (h ~ "\r\n")); - else - writeln(h); + else { + version(CRuntime_Musl) { + stdout.rawWrite(h); + stdout.rawWrite("\n"); + } else { + writeln(h); + } + } } if(rawDataOutput !is null) rawDataOutput(cast(const(ubyte)[]) ("\r\n")); - else - writeln(""); + else { + version(CRuntime_Musl) { + stdout.rawWrite("\n"); + } else { + writeln(""); + } + } outputtedResponseData = true; }