Fix 404 when accessing web UI with the prefix, but without ending /

Thanks, txtsd
This commit is contained in:
Alexey Sokolov
2015-12-30 16:06:09 +00:00
parent 840acbfb5d
commit 901ead89d5

View File

@@ -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);
}