How to setup D language with Apache httpd cgi?
BoQsc
vaidas.boqsc at gmail.com
Wed Jul 31 17:04:58 UTC 2019
However I tried to add options (--single) to the dub shebang and
apache now throwing: "bad header error"
Without "--single" option seems to work.
>#!/usr/bin/env -vS dub --single
>/+ dub.sdl:
> name "application"
> dependency "arsd-official:dom" version="4.0.2"
>+/
>import std.stdio;
>import arsd.dom;
>void main()
>{
> writeln(`Content-type: text/html`);
> writeln(``);
> writeln(`test`);
>
>}
>split -S: 'dub --single'
> into: 'dub'
> & '--single'
>executing: dub
> arg[0]= 'dub'
> arg[1]= '--single'
> arg[2]= '/usr/lib/cgi-bin/example.d'
>[Wed Jul 31 19:57:56.892522 2019] [cgid:error] [pid 833:tid
>140583783876352] [client >127.0.0.1:43598] malformed header from
>script 'example.d': Bad header: Performing "debug" >build using
More information about the Digitalmars-d-learn
mailing list