mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-10-23 01:25:20 -04:00
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:
1 parent
a0bdc0821c
commit
9e351b279e
4 files changed
+28
-24
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user