Remove get_default_response in favor of a static Response method.

We want to build different kind of response depending of the context.
This commit is contained in:
Matthieu Gautier committed 2020-08-13 11:16:41 +02:00
1 parent a0bdc0821c
commit 9e351b279e
4 files changed
+28 -24

No files matched your search

+11
View File
@@ -3,6 +3,7 @@
#include "response.h"
#include "request_context.h"
#include "internalServer.h"
#include "kiwixlib-resources.h"
#include "tools/regexTools.h"
@@ -56,6 +57,16 @@ Response::Response(const std::string& root, bool verbose, bool withTaskbar, bool
{
}
std::unique_ptr<Response> Response::build(const InternalServer& server)
{
return std::unique_ptr<Response>(new Response(
server.m_root,
server.m_verbose.load(),
server.m_withTaskbar,
server.m_withLibraryButton,
server.m_blockExternalLinks));
}
static MHD_Result print_key_value (void *cls, enum MHD_ValueKind kind,
const char *key, const char *value)