hopefully fix POST for real

- main function still could use a rewrite
- more class branching and moving of functions
- Pass minisrv_config to classes
This commit is contained in:
zefie
2021-08-10 21:41:34 -04:00
parent 5d07f02490
commit 3dd6e51832
11 changed files with 211 additions and 102 deletions

View File

@@ -0,0 +1,23 @@
// todo some fancy ass file manager or something
if (socket.ssid) {
if (ssid_sessions[socket.ssid]) {
if (ssid_sessions[socket.ssid].isRegistered()) {
data = ssid_sessions[socket.ssid].getUserStoreFileByURL("file://Disk/Demo/allyouneed.html");
//data = ssid_sessions[socket.ssid].getUserStoreFile("Disk/Demo/allyouneed.html");
var contype = ssid_sessions[socket.ssid].getUserStoreContentType("file://Disk/Demo/allyouneed.html");
if (data) {
headers = "200 OK\n";
headers += "Content-Type: " + contype;
}
}
}
}
if (!headers) {
var errpage = doErrorPage(400)
headers = errpage[0];
data = errpage[1];
}