diff --git a/libhttp/httpconnection.c b/libhttp/httpconnection.c index a19ac3f..521d610 100644 --- a/libhttp/httpconnection.c +++ b/libhttp/httpconnection.c @@ -568,7 +568,7 @@ void httpTransfer(struct HttpConnection *http, char *msg, int len) { // also has difficulties with SSL connections that are being proxied. int ieBug = 0; const char *userAgent = getFromHashMap(&http->header, "user-agent"); - const char *msie = userAgent ? strstr(userAgent, "MSIE ") : NULL; + const char *msie = userAgent ? strstr(userAgent, "Trident") : NULL; if (msie) { ieBug++; } diff --git a/shellinabox/launcher.c b/shellinabox/launcher.c index 68d8862..69e29e6 100644 --- a/shellinabox/launcher.c +++ b/shellinabox/launcher.c @@ -1616,7 +1616,8 @@ static void launcherDaemon(int fd) { int status; pid_t pid; while (NOINTR(pid = waitpid(-1, &status, WNOHANG)) > 0) { - if (WIFEXITED(pid) || WIFSIGNALED(pid)) { + debug("Child %d exited with exit code %d\n", pid, WEXITSTATUS(status)); + if (WIFEXITED(status) || WIFSIGNALED(status)) { char key[32]; snprintf(&key[0], sizeof(key), "%d", pid); deleteFromHashMap(childProcesses, key); @@ -1636,7 +1637,8 @@ static void launcherDaemon(int fd) { break; } while (NOINTR(pid = waitpid(-1, &status, WNOHANG)) > 0) { - if (WIFEXITED(pid) || WIFSIGNALED(pid)) { + debug("Child %d exited with exit code %d\n", pid, WEXITSTATUS(status)); + if (WIFEXITED(status) || WIFSIGNALED(status)) { char key[32]; snprintf(&key[0], sizeof(key), "%d", pid); deleteFromHashMap(childProcesses, key); diff --git a/shellinabox/root_page.html b/shellinabox/root_page.html index 38bde27..41b6488 100644 --- a/shellinabox/root_page.html +++ b/shellinabox/root_page.html @@ -99,6 +99,16 @@ ''); } })(); + + // User warning on window close + window.onbeforeunload = function(e) { + if (typeof window.shellinabox.session != "undefined") { + return "Are you sure you want to leave this page?"; + } else { + return null; + } + } + --> @@ -107,7 +117,7 @@ correctly deal with the enclosing frameset (if any), if we do not do this --> -