From 901ead89d5c842357ffd1fe3ffd860de870ff0ff Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Wed, 30 Dec 2015 16:06:09 +0000 Subject: [PATCH] Fix 404 when accessing web UI with the prefix, but without ending / Thanks, txtsd --- src/HTTPSock.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/HTTPSock.cpp b/src/HTTPSock.cpp index e101971f..da196e47 100644 --- a/src/HTTPSock.cpp +++ b/src/HTTPSock.cpp @@ -225,6 +225,9 @@ void CHTTPSock::GetPage() { DEBUG("Expected prefix: " << m_sURIPrefix); DEBUG("Requested path: " << m_sURI); Redirect("/"); + } else if (m_sURI.empty()) { + // This can happen if prefix was /foo, and the requested page is /foo + Redirect("/"); } else { OnPageRequest(m_sURI); }