summaryrefslogtreecommitdiff
path: root/source4/web_server/esp/espProcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/web_server/esp/espProcs.c')
-rw-r--r--source4/web_server/esp/espProcs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/web_server/esp/espProcs.c b/source4/web_server/esp/espProcs.c
index a8da800213..5c99e092c9 100644
--- a/source4/web_server/esp/espProcs.c
+++ b/source4/web_server/esp/espProcs.c
@@ -77,8 +77,12 @@ static int includeProc(EspRequest *ep, int argc, char **argv)
esp = ep->esp;
mprAssert(argv);
for (i = 0; i < argc; i++) {
- mprGetDirName(dir, sizeof(dir), ep->docPath);
- mprSprintf(path, sizeof(path), "%s/%s", dir, argv[i]);
+ if (argv[i][0] != '/') {
+ mprGetDirName(dir, sizeof(dir), ep->docPath);
+ mprSprintf(path, sizeof(path), "%s/%s", dir, argv[i]);
+ } else {
+ mprSprintf(path, sizeof(path), "%s", argv[i]);
+ }
if (esp->readFile(ep->requestHandle, &buf, &size, path) < 0) {
espError(ep, "Can't read include file: %s", path);