Commit Diff


commit - 13e4d4f78b59136f0e590fbb4cb79a4c94551576
commit + 89b827214e68c971373e4ceca0eeb36663ab6b02
blob - e889ef2141cd9def0b1f3aa302ba15309f7a89da
blob + 8d11358f2c226c6c3c9d113a67c5801b779320fc
--- deskd.c
+++ deskd.c
@@ -183,7 +183,7 @@ main(const int argc, char *argv[])
 		else
 			cgi_error(405);
 	} else {
-		cgi_error(404);
+		cgi_redirect(302, "/");
 	}
 
 	free(path_copy);
blob - 81d3348e15abf9db35adb39908f9e9d5aa1f505d
blob + 6154e72ca9472527d7cb8850f6ff627bdd32443d
--- test/route-unknown.test
+++ test/route-unknown.test
@@ -1,4 +1,4 @@
-Unknown route returns 404.
+Unknown route redirects to home page.
 ---
 ---
 ---
@@ -8,7 +8,8 @@ SERVER_PROTOCOL=HTTP/1.1
 ---
 ---
 ---
-Status: 404 Not Found
-Content-Type: text/plain; charset=utf-8
+Status: 302 Found
+Content-Type: text/html; charset=utf-8
+Location: /
 
-Not Found
+<a href="/">Found</a>.