diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/.sledjChisl.conf.lua | 7 | ||||
-rw-r--r-- | src/sledjchisl/sledjchisl.c | 83 |
2 files changed, 40 insertions, 50 deletions
diff --git a/src/.sledjChisl.conf.lua b/src/.sledjChisl.conf.lua index cede4e4..61d709d 100644 --- a/src/.sledjChisl.conf.lua +++ b/src/.sledjChisl.conf.lua | |||
@@ -14,7 +14,7 @@ config = | |||
14 | ["debug"] = false; | 14 | ["debug"] = false; |
15 | ["scUser"] = "opensimsc"; | 15 | ["scUser"] = "opensimsc"; |
16 | ["Tconsole"] = "SledjChisl"; | 16 | ["Tconsole"] = "SledjChisl"; |
17 | ["Tsocket"] = "opensim-tmux.socket"; | 17 | ["Tsocket"] = "opensim-tmux.socket"; -- Ends up in scRoot/var/run |
18 | ["Ttab"] = "SC"; | 18 | ["Ttab"] = "SC"; |
19 | ["loadAverageInc"] = 0.7; | 19 | ["loadAverageInc"] = 0.7; |
20 | ["simTimeOut"] = 45; -- seconds | 20 | ["simTimeOut"] = 45; -- seconds |
@@ -22,9 +22,8 @@ config = | |||
22 | ["backupIARsim"] = "Sandbox"; | 22 | ["backupIARsim"] = "Sandbox"; |
23 | ["rsync"] = ""; | 23 | ["rsync"] = ""; |
24 | ["rsyncPort"] = 0; | 24 | ["rsyncPort"] = 0; |
25 | ["webRoot"] = "/var/www/html"; | 25 | ["webRoot"] = "/var/www/html"; -- Relative to scRoot. |
26 | ["webHost"] = "localhost"; | 26 | ["webSocket"] = "sledjchisl.socket"; -- Ends up in scRoot/var/run |
27 | ["URL"] = "sledjchisl.fcgi"; | ||
28 | ["webIframers"] = ""; -- Space separated list of hosts allowed to iFrame us, coz someone asked. Include the "https://" bit. | 27 | ["webIframers"] = ""; -- Space separated list of hosts allowed to iFrame us, coz someone asked. Include the "https://" bit. |
29 | ["seshRenew"] = 10 * 60; -- seconds | 28 | ["seshRenew"] = 10 * 60; -- seconds |
30 | ["idleTimeOut"] = 30 * 60; -- seconds | 29 | ["idleTimeOut"] = 30 * 60; -- seconds |
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index b333357..e5e6460 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c | |||
@@ -535,7 +535,7 @@ char *backupIARsim = "Sandbox"; | |||
535 | char *rSync = ""; | 535 | char *rSync = ""; |
536 | int rSyncPort = 0; | 536 | int rSyncPort = 0; |
537 | char *webRoot = "/var/www/html"; | 537 | char *webRoot = "/var/www/html"; |
538 | char *URL = "fcgi-bin/sledjchisl.fcgi"; | 538 | char *webSocket = "sledjchisl.socket"; |
539 | char *ToS = "Be good."; | 539 | char *ToS = "Be good."; |
540 | char *webIframers = ""; | 540 | char *webIframers = ""; |
541 | int seshRenew = 10 * 60; | 541 | int seshRenew = 10 * 60; |
@@ -1428,7 +1428,6 @@ static void testOpenSim(simData *simd, char *sim, char *type, int count, int win | |||
1428 | 1428 | ||
1429 | 1429 | ||
1430 | 1430 | ||
1431 | |||
1432 | static int getIntFromIni(qlisttbl_t *ini, char *name) | 1431 | static int getIntFromIni(qlisttbl_t *ini, char *name) |
1433 | { | 1432 | { |
1434 | int ret; | 1433 | int ret; |
@@ -4151,6 +4150,7 @@ cookie *setCookie(reqData *Rd, char *cki, char *value) | |||
4151 | ret->httpOnly = TRUE; | 4150 | ret->httpOnly = TRUE; |
4152 | ret->site = CS_STRICT; | 4151 | ret->site = CS_STRICT; |
4153 | ret->secure = TRUE; | 4152 | ret->secure = TRUE; |
4153 | // TODO - can we use Rd->Script here? | ||
4154 | ret->path = getStrH(Rd->headers, "SCRIPT_NAME"); | 4154 | ret->path = getStrH(Rd->headers, "SCRIPT_NAME"); |
4155 | Rd->Rcookies->put(Rd->Rcookies, cook, ret, sizeof(cookie)); | 4155 | Rd->Rcookies->put(Rd->Rcookies, cook, ret, sizeof(cookie)); |
4156 | free(ret); | 4156 | free(ret); |
@@ -4259,27 +4259,13 @@ static void HTMLheader(qgrow_t *reply, char *title) | |||
4259 | " <title>%s</title>\n" | 4259 | " <title>%s</title>\n" |
4260 | " <meta charset=\"UTF-8\">\n" | 4260 | " <meta charset=\"UTF-8\">\n" |
4261 | " <link rel=\"shortcut icon\" href=\"/SledjHamrIconSmall.png\">\n" | 4261 | " <link rel=\"shortcut icon\" href=\"/SledjHamrIconSmall.png\">\n" |
4262 | " <link type='text/css' rel='stylesheet' href='/SledjChisl.css' media='all' />\n" | ||
4262 | , title); | 4263 | , title); |
4263 | reply->addstrf(reply, " <link type='text/css' rel='stylesheet' href='/SledjChisl.css' media='all' />\n"); | ||
4264 | 4264 | ||
4265 | if (DEBUG) | 4265 | if (DEBUG) |
4266 | reply->addstrf(reply, " <link type='text/css' rel='stylesheet' href='/debugStyle.css' media='all' />\n"); | 4266 | reply->addstrf(reply, " <link type='text/css' rel='stylesheet' href='/debugStyle.css' media='all' />\n"); |
4267 | 4267 | ||
4268 | reply->addstrf(reply, | 4268 | reply->addstrf(reply, |
4269 | " <style> \n" | ||
4270 | " html, body {background-color: black; color: white; font-family: 'sans-serif'; margin: 0; padding: 0;}\n" | ||
4271 | " a:link {color: aqua;}\n" | ||
4272 | " a:visited {color: fuchsia;}\n" | ||
4273 | " a:hover {color: blue;}\n" | ||
4274 | " a:active {color: red;}\n" | ||
4275 | " button {background-color: darkgreen; color: white; font-family: 'sans-serif';}\n" | ||
4276 | " button:hover {color: blue;}\n" | ||
4277 | " button:active {color: red;}\n" | ||
4278 | " label {background-color:darkgreen; color: white; font-family: 'sans-serif'; font-size: 160%;}\n" | ||
4279 | " input {background-color:darkblue; color: white; font-family: 'sans-serif'; font-size: 80%;}\n" | ||
4280 | // What idiot thought aligning the label with the bottom of textareas was a good default? | ||
4281 | " textarea {background-color:darkblue; color: white; font-family: 'sans-serif'; font-size: 80%; vertical-align: top;}\n" | ||
4282 | " </style>\n" | ||
4283 | " </head>\n" | 4269 | " </head>\n" |
4284 | " <body bgcolor='black' text='white' link='aqua' vlink='fuchsia' alink='red'>\n" | 4270 | " <body bgcolor='black' text='white' link='aqua' vlink='fuchsia' alink='red'>\n" |
4285 | " <font face='sans-serif'>\n" | 4271 | " <font face='sans-serif'>\n" |
@@ -5080,9 +5066,6 @@ t("checkSLOSpassword(%s, %s, %s, ", password, salt, passwordHash, fail); | |||
5080 | return ret; | 5066 | return ret; |
5081 | } | 5067 | } |
5082 | 5068 | ||
5083 | |||
5084 | |||
5085 | |||
5086 | char *checkLinky(reqData *Rd) | 5069 | char *checkLinky(reqData *Rd) |
5087 | { | 5070 | { |
5088 | // TODO - should be from Rd.shs->linky-hashish | 5071 | // TODO - should be from Rd.shs->linky-hashish |
@@ -5109,7 +5092,10 @@ char *checkLinky(reqData *Rd) | |||
5109 | // "<a href='https://%s%s?hashish=%s'>%s</a>" | 5092 | // "<a href='https://%s%s?hashish=%s'>%s</a>" |
5110 | "</b></font></p>\n", | 5093 | "</b></font></p>\n", |
5111 | "grid_no_reply", Rd->Host, | 5094 | "grid_no_reply", Rd->Host, |
5112 | Rd->Host, Rd->RUri | 5095 | "grid_no_reply", Rd->Host, |
5096 | "grid_no_reply", Rd->Host, | ||
5097 | "grid_no_reply", Rd->Host | ||
5098 | // Rd->Host, Rd->RUri | ||
5113 | // ,t1, t0 | 5099 | // ,t1, t0 |
5114 | ); | 5100 | ); |
5115 | free(t1); | 5101 | free(t1); |
@@ -8073,12 +8059,12 @@ static void cleanup(void) | |||
8073 | { | 8059 | { |
8074 | C("Caught signal, or quitting, cleaning up."); | 8060 | C("Caught signal, or quitting, cleaning up."); |
8075 | 8061 | ||
8076 | char *cmd = xmprintf("%s/sledjchisl.socket", scRun); | 8062 | char *cmd = xmprintf("%s/%s", scRun, webSocket); |
8077 | 8063 | ||
8078 | if (isWeb && qfile_exist(cmd)) | 8064 | if (isWeb && qfile_exist(cmd)) |
8079 | { | 8065 | { |
8080 | V("Deleting web socket."); | 8066 | V("Deleting web socket."); |
8081 | if (shellMeFail("rm %s/sledjchisl.socket", scRun)) | 8067 | if (shellMeFail("rm %s/%s", scRun, webSocket)) |
8082 | E("rm command failed!"); | 8068 | E("rm command failed!"); |
8083 | } | 8069 | } |
8084 | free(cmd); | 8070 | free(cmd); |
@@ -8191,7 +8177,7 @@ int scanForConfigs(char **cPaths) | |||
8191 | if ((tmp = configs->getstr(configs, "rsync", false)) != NULL) {rSync = tmp; V("Setting rsync = %s", rSync);} | 8177 | if ((tmp = configs->getstr(configs, "rsync", false)) != NULL) {rSync = tmp; V("Setting rsync = %s", rSync);} |
8192 | if ((vd = configs->getstr(configs, "rsyncPort", false)) != NULL) {rSyncPort = (int) *((float *) vd); V("Setting rsyncPort = %s", rSyncPort);} | 8178 | if ((vd = configs->getstr(configs, "rsyncPort", false)) != NULL) {rSyncPort = (int) *((float *) vd); V("Setting rsyncPort = %s", rSyncPort);} |
8193 | if ((tmp = configs->getstr(configs, "webRoot", false)) != NULL) {webRoot = tmp; V("Setting webRoot = %s", webRoot);} | 8179 | if ((tmp = configs->getstr(configs, "webRoot", false)) != NULL) {webRoot = tmp; V("Setting webRoot = %s", webRoot);} |
8194 | if ((tmp = configs->getstr(configs, "URL", false)) != NULL) {URL = tmp; V("Setting URL = %s", URL);} | 8180 | if ((tmp = configs->getstr(configs, "webSocket", false)) != NULL) {webSocket = tmp; V("Setting webSocket = %s", webSocket);} |
8195 | if ((vd = configs->get (configs, "seshRenew", NULL, false)) != NULL) {seshRenew = (int) *((float *) vd); V("Setting seshRenew = %d", seshRenew);} | 8181 | if ((vd = configs->get (configs, "seshRenew", NULL, false)) != NULL) {seshRenew = (int) *((float *) vd); V("Setting seshRenew = %d", seshRenew);} |
8196 | if ((vd = configs->get (configs, "idleTimeOut", NULL, false)) != NULL) {idleTimeOut = (int) *((float *) vd); V("Setting idleTimeOut = %d", idleTimeOut);} | 8182 | if ((vd = configs->get (configs, "idleTimeOut", NULL, false)) != NULL) {idleTimeOut = (int) *((float *) vd); V("Setting idleTimeOut = %d", idleTimeOut);} |
8197 | if ((vd = configs->get (configs, "seshTimeOut", NULL, false)) != NULL) {seshTimeOut = (int) *((float *) vd); V("Setting seshTimeOut = %d", seshTimeOut);} | 8183 | if ((vd = configs->get (configs, "seshTimeOut", NULL, false)) != NULL) {seshTimeOut = (int) *((float *) vd); V("Setting seshTimeOut = %d", seshTimeOut);} |
@@ -8483,7 +8469,7 @@ Copy correct config/config.ini to there. | |||
8483 | // A bit chicken and egg here. | 8469 | // A bit chicken and egg here. |
8484 | // We need to be the correct user to set the correct perms on the scRun directory | 8470 | // We need to be the correct user to set the correct perms on the scRun directory |
8485 | // But we wont be the correct user until we run tmux as that user. | 8471 | // But we wont be the correct user until we run tmux as that user. |
8486 | // The path to sledjchisl.socket needs to be readable by the www-data group. So the FCGI socket will work. | 8472 | // The path to the web socket needs to be readable by the www-data group. So the FCGI socket will work. |
8487 | // AND it needs to be group sticky on opensimsc group. So the tmux socket will work. | 8473 | // AND it needs to be group sticky on opensimsc group. So the tmux socket will work. |
8488 | // Put both in scRun, and make it other readable? | 8474 | // Put both in scRun, and make it other readable? |
8489 | // TODO - No idea of the SECURITY HOLE that might cause. | 8475 | // TODO - No idea of the SECURITY HOLE that might cause. |
@@ -8570,7 +8556,7 @@ Copy correct config/config.ini to there. | |||
8570 | // Make the FCGI socket world read / write, coz we can't set it to group www-data, since -G only works for root, and we ain't root. | 8556 | // Make the FCGI socket world read / write, coz we can't set it to group www-data, since -G only works for root, and we ain't root. |
8571 | // TODO - BIG SECURITY HOLE??? | 8557 | // TODO - BIG SECURITY HOLE??? |
8572 | "bash -c 'export PATH=%s:$PATH; printf \"\\033]0;FCGI web server\\007\"; sleep 2;" // The sleep is so that both are not creating the .shini files at the same time. | 8558 | "bash -c 'export PATH=%s:$PATH; printf \"\\033]0;FCGI web server\\007\"; sleep 2;" // The sleep is so that both are not creating the .shini files at the same time. |
8573 | "spawn-fcgi -n -u %s -s %s/sledjchisl.socket -M 0666 -G www-data -- /usr/bin/valgrind --leak-check=full %s/current/bin/sledjchisl %s; " | 8559 | "spawn-fcgi -n -u %s -s %s/%s -M 0666 -G www-data -- /usr/bin/valgrind --leak-check=full %s/current/bin/sledjchisl %s; " |
8574 | "cd %s; bash'" | 8560 | "cd %s; bash'" |
8575 | , | 8561 | , |
8576 | pre, Tcmd, scRun, Tsocket, scBin, | 8562 | pre, Tcmd, scRun, Tsocket, scBin, |
@@ -8580,7 +8566,7 @@ Copy correct config/config.ini to there. | |||
8580 | Tconsole, | 8566 | Tconsole, |
8581 | Tconsole, | 8567 | Tconsole, |
8582 | scBin, | 8568 | scBin, |
8583 | scUser, scRun, scRoot, FLAG(v) ? "-v" : "", | 8569 | scUser, scRun, webSocket, scRoot, FLAG(v) ? "-v" : "", |
8584 | scRoot | 8570 | scRoot |
8585 | ); | 8571 | ); |
8586 | free(pre); | 8572 | free(pre); |
@@ -8638,31 +8624,36 @@ Copy correct config/config.ini to there. | |||
8638 | and by a privileged process | 8624 | and by a privileged process |
8639 | */ | 8625 | */ |
8640 | V("Making directories in %s.", scRoot); | 8626 | V("Making directories in %s.", scRoot); |
8641 | if ((! qfile_exist(scBin)) && (! qfile_mkdir(scBin, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scBin); | 8627 | if ((! qfile_exist(scBin)) && (! qfile_mkdir(scBin, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scBin); |
8642 | if ((! qfile_exist(scEtc)) && (! qfile_mkdir(scEtc, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scEtc); | 8628 | if ((! qfile_exist(scEtc)) && (! qfile_mkdir(scEtc, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scEtc); |
8643 | if ((! qfile_exist(scLib)) && (! qfile_mkdir(scLib, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scLib); | 8629 | if ((! qfile_exist(scLib)) && (! qfile_mkdir(scLib, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scLib); |
8644 | if ((! qfile_exist(scBackup)) && (! qfile_mkdir(scBackup, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scBackup); | 8630 | if ((! qfile_exist(scBackup)) && (! qfile_mkdir(scBackup, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scBackup); |
8645 | if ((! qfile_exist(scCache)) && (! qfile_mkdir(scCache, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scCache); | 8631 | if ((! qfile_exist(scCache)) && (! qfile_mkdir(scCache, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scCache); |
8646 | if ((! qfile_exist(scData)) && (! qfile_mkdir(scData, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scData); | 8632 | if ((! qfile_exist(scData)) && (! qfile_mkdir(scData, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scData); |
8647 | if ((! qfile_exist(scLog)) && (! qfile_mkdir(scLog, S_IRWXU, true))) C("Unable to create path %s", scLog); | 8633 | if ((! qfile_exist(scLog)) && (! qfile_mkdir(scLog, S_IRWXU, true))) C("Unable to create path %s", scLog); |
8648 | if ((! qfile_exist(scTemp)) && (! qfile_mkdir(scTemp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scTemp); | 8634 | if ((! qfile_exist(scTemp)) && (! qfile_mkdir(scTemp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", scTemp); |
8649 | tmp = xmprintf("%s/sessions", scCache); | 8635 | tmp = xmprintf("%s/sessions", scCache); |
8650 | if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); | 8636 | if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); |
8651 | free(tmp); | 8637 | free(tmp); |
8652 | tmp = xmprintf("%s/users", scData); | 8638 | tmp = xmprintf("%s/users", scData); |
8653 | if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); | 8639 | if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); |
8654 | free(tmp); | 8640 | free(tmp); |
8655 | tmp = xmprintf("%s/db", scData); | 8641 | tmp = xmprintf("%s/db", scData); |
8656 | if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); | 8642 | if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); |
8657 | free(tmp); | 8643 | free(tmp); |
8658 | tmp = xmprintf("%s/config", scRoot); | 8644 | tmp = xmprintf("%s/config", scRoot); |
8659 | if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); | 8645 | if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); |
8660 | free(tmp); | 8646 | free(tmp); |
8661 | tmp = xmprintf("%s/AssetFiles/data", scRoot); | 8647 | tmp = xmprintf("%s/AssetFiles/data", scRoot); |
8662 | if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); | 8648 | if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); |
8663 | free(tmp); | 8649 | free(tmp); |
8664 | tmp = xmprintf("%s/web", scRoot); | 8650 | tmp = xmprintf("%s/var/www/html", scRoot); |
8665 | if ((! qfile_exist(tmp)) && (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true))) C("Unable to create path %s", tmp); | 8651 | if (! qfile_exist(tmp)) |
8652 | { | ||
8653 | if (! qfile_mkdir(tmp, S_IRWXU | S_IRGRP | S_IXGRP, true)) C("Unable to create path %s", tmp); | ||
8654 | free(tmp); | ||
8655 | if (shellMeFail("cp %s/current/example/var/www/html/* %s/var/www/html", scRoot, scRoot)) C("Unable to copy files to %s/var/www/html", scRoot); | ||
8656 | } | ||
8666 | free(tmp); | 8657 | free(tmp); |
8667 | 8658 | ||
8668 | /* TODO - tighten up security. | 8659 | /* TODO - tighten up security. |
@@ -9004,7 +8995,7 @@ Create the /opt/opensim-SC directory structure. | |||
9004 | 8995 | ||
9005 | // FCGI_LISTENSOCK_FILENO is the socket to the web server. | 8996 | // FCGI_LISTENSOCK_FILENO is the socket to the web server. |
9006 | // STDOUT and STDERR go to the web servers error log, or at least it does in Apache 2 mod_fcgid. | 8997 | // STDOUT and STDERR go to the web servers error log, or at least it does in Apache 2 mod_fcgid. |
9007 | I("Running SledjChisl inside a web server, pid %d, socket %s/sledjchisl.socket.", getpid(), scRun); | 8998 | I("Running SledjChisl inside a web server, pid %d, socket %s/%s.", getpid(), scRun, webSocket); |
9008 | 8999 | ||
9009 | if (0 == toys.optc) | 9000 | if (0 == toys.optc) |
9010 | D("no args"); | 9001 | D("no args"); |
@@ -9144,7 +9135,7 @@ t("BODY"); | |||
9144 | free(Body); | 9135 | free(Body); |
9145 | santize(Rd->body); | 9136 | santize(Rd->body); |
9146 | 9137 | ||
9147 | D("%s %s://%s%s -> %s%s", Rd->Method, Rd->Scheme, Rd->Host, Rd->RUri, webRoot, Rd->Path); | 9138 | D("%s %s://%s%s -> %s%s%s", Rd->Method, Rd->Scheme, Rd->Host, Rd->RUri, scRoot, webRoot, Rd->Path); |
9148 | D("Started FCGI web request ROLE = %s, body is %s bytes, pid %d.", Role, Length, getpid()); | 9139 | D("Started FCGI web request ROLE = %s, body is %s bytes, pid %d.", Role, Length, getpid()); |
9149 | 9140 | ||
9150 | if (NULL == Rd->Path) | 9141 | if (NULL == Rd->Path) |
@@ -9208,7 +9199,7 @@ t("BODY"); | |||
9208 | } | 9199 | } |
9209 | 9200 | ||
9210 | memset(toybuf, 0, sizeof(toybuf)); | 9201 | memset(toybuf, 0, sizeof(toybuf)); |
9211 | snprintf(toybuf, sizeof(toybuf), "%s%s", webRoot, Rd->Path); | 9202 | snprintf(toybuf, sizeof(toybuf), "%s%s%s", scRoot, webRoot, Rd->Path); |
9212 | HTMLfile *thisFile = checkHTMLcache(toybuf); | 9203 | HTMLfile *thisFile = checkHTMLcache(toybuf); |
9213 | if (NULL == thisFile) | 9204 | if (NULL == thisFile) |
9214 | { | 9205 | { |
@@ -9335,7 +9326,7 @@ sendReply: | |||
9335 | 9326 | ||
9336 | fcgiDone: | 9327 | fcgiDone: |
9337 | FCGI_Finish(); | 9328 | FCGI_Finish(); |
9338 | snprintf(toybuf, sizeof(toybuf), " for %s %s://%s%s -> %s%s", Rd->Method, Rd->Scheme, Rd->Host, Rd->RUri, webRoot, Rd->Path); | 9329 | snprintf(toybuf, sizeof(toybuf), " for %s %s://%s%s -> %s%s%s", Rd->Method, Rd->Scheme, Rd->Host, Rd->RUri, scRoot, webRoot, Rd->Path); |
9339 | if (NULL != Rd->outQuery) free(Rd->outQuery); | 9330 | if (NULL != Rd->outQuery) free(Rd->outQuery); |
9340 | if (NULL != Rd->shs.name) free(Rd->shs.name); | 9331 | if (NULL != Rd->shs.name) free(Rd->shs.name); |
9341 | Rd->shs.name = NULL; | 9332 | Rd->shs.name = NULL; |