diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/download.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp index 2d8b99cb6..fad0bf6f2 100644 --- a/src/net/download.cpp +++ b/src/net/download.cpp @@ -22,6 +22,7 @@ #include "net/download.h" #include "configuration.h" +#include "client.h" #include "logger.h" #include "main.h" @@ -72,6 +73,15 @@ Download::Download(void *const ptr, const std::string &url, mOptions.cancel = 0; mOptions.memoryWrite = 0; mOptions.checkAdler = true; + const std::string serverName = Client::getServerName(); + if (!serverName.empty()) + { + if (mUrl.find("?") == std::string::npos) + mUrl.append("?host="); + else + mUrl.append("&host="); + mUrl.append(serverName); + } } Download::~Download() |