mirror of https://github.com/adamdruppe/arsd.git
all only host to be specified for unix sockets
This commit is contained in:
parent
ea0eb49d64
commit
fa53cb3395
4
cgi.d
4
cgi.d
|
@ -4010,16 +4010,16 @@ void serveFastCgi(alias fun, CustomCgi = Cgi, long maxContentLength = defaultMax
|
||||||
}
|
}
|
||||||
|
|
||||||
auto lp = params.listeningPort;
|
auto lp = params.listeningPort;
|
||||||
|
auto host = params.listeningHost;
|
||||||
|
|
||||||
FCGX_Request request;
|
FCGX_Request request;
|
||||||
if(lp) {
|
if(lp || !host.empty) {
|
||||||
// if a listening port was specified on the command line, we want to spawn ourself
|
// if a listening port was specified on the command line, we want to spawn ourself
|
||||||
// (needed for nginx without spawn-fcgi, e.g. on Windows)
|
// (needed for nginx without spawn-fcgi, e.g. on Windows)
|
||||||
FCGX_Init();
|
FCGX_Init();
|
||||||
|
|
||||||
int sock;
|
int sock;
|
||||||
|
|
||||||
auto host = params.listeningHost;
|
|
||||||
if(host.startsWith("unix:")) {
|
if(host.startsWith("unix:")) {
|
||||||
sock = FCGX_OpenSocket(toStringz(params.listeningHost["unix:".length .. $]), 12);
|
sock = FCGX_OpenSocket(toStringz(params.listeningHost["unix:".length .. $]), 12);
|
||||||
} else if(host.startsWith("abstract:")) {
|
} else if(host.startsWith("abstract:")) {
|
||||||
|
|
Loading…
Reference in New Issue