From 4a0130343882e06f6e86e091367ece0cd4fff524 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 7 Jan 2020 17:06:12 +0100 Subject: [PATCH] Correctly set the id of the opds stream. Set the id of the stream *after* the uuid is generated. --- ChangeLog | 5 +++++ src/server.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9172b7357..a2e542550 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +kiwix-lib 8.2.3 +=============== + + * [OPDS] Correctly set the id of the OPDS stream. + kiwix-lib 8.2.2 =============== diff --git a/src/server.cpp b/src/server.cpp index 180a1c101..7ff57360a 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -742,7 +742,6 @@ Response InternalServer::handle_catalog(const RequestContext& request) kiwix::OPDSDumper opdsDumper; opdsDumper.setRootLocation(m_root); opdsDumper.setSearchDescriptionUrl("catalog/searchdescription.xml"); - opdsDumper.setId(kiwix::to_string(uuid)); opdsDumper.setLibrary(mp_library); response.set_mimeType("application/atom+xml;profile=opds-catalog;kind=acquisition; charset=utf-8"); std::vector bookIdsToDump; @@ -792,6 +791,7 @@ Response InternalServer::handle_catalog(const RequestContext& request) opdsDumper.setOpenSearchInfo(totalResults, startIndex, bookIdsToDump.size()); } + opdsDumper.setId(kiwix::to_string(uuid)); response.set_content(opdsDumper.dumpOPDSFeed(bookIdsToDump)); return response; }