mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-10-22 17:15:18 -04:00
Introduce operator+= to simplify response creation.
This commit is contained in:
1 parent
f42f6a60df
commit
4695f47dd2
3 files changed
+23
-6
No files matched your search
@@ -633,12 +633,13 @@ std::unique_ptr<Response> InternalServer::handle_search(const RequestContext& re
|
||||
// Searcher->search will throw a runtime error if there is no valid xapian database to do the search.
|
||||
// (in case of zim file not containing a index)
|
||||
const auto cssUrl = renderUrl(m_root, RESOURCE::templates::url_of_search_results_css);
|
||||
return HTTPErrorHtmlResponse(*this, request, MHD_HTTP_NOT_FOUND,
|
||||
"fulltext-search-unavailable",
|
||||
"404-page-heading",
|
||||
cssUrl)
|
||||
+ nonParameterizedMessage("no-search-results")
|
||||
+ TaskbarInfo(searchInfo.bookName, archive.get());
|
||||
HTTPErrorHtmlResponse response(*this, request, MHD_HTTP_NOT_FOUND,
|
||||
"fulltext-search-unavailable",
|
||||
"404-page-heading",
|
||||
cssUrl);
|
||||
response += nonParameterizedMessage("no-search-results");
|
||||
response += TaskbarInfo(searchInfo.bookName, archive.get());
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user