mirror of https://github.com/kiwix/libkiwix.git
Moved handling of the "/" URL
This commit is contained in:
parent
d737db666a
commit
a4b18893aa
|
@ -539,6 +539,9 @@ std::unique_ptr<Response> InternalServer::handle_request(const RequestContext& r
|
||||||
if ( isLocallyCustomizedResource(request.get_url()) )
|
if ( isLocallyCustomizedResource(request.get_url()) )
|
||||||
return handle_locally_customized_resource(request);
|
return handle_locally_customized_resource(request);
|
||||||
|
|
||||||
|
if (request.get_url() == "/" )
|
||||||
|
return build_homepage(request);
|
||||||
|
|
||||||
if (startsWith(request.get_url(), "/skin/"))
|
if (startsWith(request.get_url(), "/skin/"))
|
||||||
return handle_skin(request);
|
return handle_skin(request);
|
||||||
|
|
||||||
|
@ -955,8 +958,6 @@ std::unique_ptr<Response> InternalServer::handle_content(const RequestContext& r
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string bookName = get_book_name(request);
|
const std::string bookName = get_book_name(request);
|
||||||
if (bookName.empty())
|
|
||||||
return build_homepage(request);
|
|
||||||
|
|
||||||
std::shared_ptr<zim::Archive> archive;
|
std::shared_ptr<zim::Archive> archive;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue