Added unix socket support in HttpdOutputPlugin

This commit is contained in:
1848
2018-08-07 19:28:29 +02:00
parent 52521d02ea
commit 0c1a899fbe
3 changed files with 4 additions and 8 deletions

View File

@@ -33,6 +33,7 @@
#include "util/Domain.hxx"
#include "util/DeleteDisposer.hxx"
#include "Log.hxx"
#include "config/Net.hxx"
#include <assert.h>
@@ -58,17 +59,11 @@ HttpdOutput::HttpdOutput(EventLoop &_loop, const ConfigBlock &block)
genre = block.GetBlockValue("genre", "Set genre in config");
website = block.GetBlockValue("website", "Set website in config");
unsigned port = block.GetBlockValue("port", 8000u);
clients_max = block.GetBlockValue("max_clients", 0u);
/* set up bind_to_address */
const char *bind_to_address = block.GetBlockValue("bind_to_address");
if (bind_to_address != nullptr && strcmp(bind_to_address, "any") != 0)
AddHost(bind_to_address, port);
else
AddPort(port);
ServerSocketAddGeneric(*this, block.GetBlockValue("bind_to_address"), block.GetBlockValue("port", 8000u));
/* determine content type */
content_type = prepared_encoder->GetMimeType();