aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/loader/loader.nim7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/loader/loader.nim b/src/loader/loader.nim
index d7b9a2a5..595847a8 100644
--- a/src/loader/loader.nim
+++ b/src/loader/loader.nim
@@ -24,6 +24,7 @@ import std/streams
import std/strutils
import std/tables
+import config/chapath
import io/posixstream
import io/promise
import io/serialize
@@ -101,6 +102,7 @@ type
ssock: ServerSocket
alive: bool
config: LoaderConfig
+ libexecPath: string
handleMap: Table[int, LoaderHandle]
outputMap: Table[int, OutputHandle]
selector: Selector[int]
@@ -115,7 +117,6 @@ type
cgiDir*: seq[string]
uriMethodMap*: URIMethodMap
w3mCGICompat*: bool
- libexecPath*: string
tmpdir*: string
LoaderClientConfig* = object
@@ -393,8 +394,7 @@ proc loadResource(ctx: LoaderContext; client: ClientData; request: Request;
redo = true
continue
if request.url.scheme == "cgi-bin":
- handle.loadCGI(request, ctx.config.cgiDir, ctx.config.libexecPath,
- prevurl)
+ handle.loadCGI(request, ctx.config.cgiDir, ctx.libexecPath, prevurl)
if handle.istream != nil:
ctx.addFd(handle)
else:
@@ -632,6 +632,7 @@ proc initLoaderContext(fd: cint; config: LoaderConfig): LoaderContext =
alive: true,
config: config,
selector: newSelector[int](),
+ libexecPath: ChaPath("${%CHA_LIBEXEC_DIR}").unquote().get
)
gctx = ctx
#TODO ideally, buffered would be true. Unfortunately this conflicts with