diff --git a/core/client.js b/core/client.js index 1e05ba48..27bd57c4 100644 --- a/core/client.js +++ b/core/client.js @@ -288,10 +288,9 @@ function updateLogin() { } else { a.setAttribute("href", "/login/logout?return=" + encodeURIComponent(url() + hash())); } - } else if (window.location.href.indexOf("?guest=1") != -1) { - window.location.href = "/login?submit=Proceed+as+Guest&return=" + encodeURIComponent(url() + hash()); } else { - window.location.href = "/login?return=" + encodeURIComponent(url() + hash()); + a.appendChild(document.createTextNode("login")); + a.setAttribute("href", "/login?return=" + encodeURIComponent(url() + hash())); } login.appendChild(a); } diff --git a/core/httpd.js b/core/httpd.js index 9d13c3f4..7fc1cc7f 100644 --- a/core/httpd.js +++ b/core/httpd.js @@ -332,9 +332,9 @@ function handleConnection(client) { } function finish() { + var requestObject = new Request(request[0], request[1], request[2], headers, body, client); + var response = new Response(requestObject, client); try { - var requestObject = new Request(request[0], request[1], request[2], headers, body, client); - var response = new Response(requestObject, client); handleRequest(requestObject, response) if (client.isConnected) { reset();