Skip to content

Commit

Permalink
fixup! Drop Reader and Entry wrappers from handle_content
Browse files Browse the repository at this point in the history
  • Loading branch information
maneeshpm authored and kelson42 committed Jun 25, 2021
1 parent 160ffb4 commit 435c6ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/server/internalServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ std::unique_ptr<Response> InternalServer::handle_content(const RequestContext& r
std::string searchURL = m_root+"/search?content="+bookName+"&pattern="+pattern; // Make a search on this specific book only.
const std::string details = searchSuggestionHTML(searchURL, kiwix::urlDecode(pattern));

return Response::build_404(*this, request, bookName, reader->getTitle(), details);
return Response::build_404(*this, request, bookName, getArchiveTitle(*archive), details);
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/tools/archiveTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ std::string getMetaTags(const zim::Archive& archive, bool original) {
bool getArchiveFavicon(const zim::Archive& archive,
std::string& content, std::string& mimeType){
try {
auto entry = archive.getFaviconEntry();
auto item = entry.getItem(true);
auto item = archive.getIllustrationItem();
content = item.getData();
mimeType = item.getMimetype();
return true;
Expand Down

0 comments on commit 435c6ad

Please sign in to comment.