On Wednesday, 31 July 2019 at 09:03:47 UTC, BoQsc wrote:
And this is the error I get now:
[Wed Jul 31 11:51:15.341790 2019] [cgid:error] [pid 870:tid
140153708345088] [client >127.0.0.1:50318] End of script output
before headers: example.d
And I have no idea how to deal with it. Cgi shows Internal Server
Error, because of that "End of script output before headers"
error.
#!/usr/bin/env -S sudo dub run --quiet --single
/+ dub.sdl:
name "hello"
dependency "arsd-official" version="~>4.0.1"
+/
import std.stdio;
void main()
{
writeln(`Content-type: text/html`);
writeln(``);
writeln(`<body style="background: lightgreen">CGI D
Example</body>`);
}
Maybe it is not possible to use dub this way.