Remote ISO: Fix bugs from issue #12018 and probably #12019

This commit is contained in:
Henrik Rydgård
2019-05-07 23:26:13 +02:00
parent 989b564fa4
commit 83039f3f90
2 changed files with 16 additions and 1 deletions
+6
View File
@@ -27,6 +27,12 @@ HTTPFileLoader::HTTPFileLoader(const std::string &filename)
void HTTPFileLoader::Prepare() {
std::call_once(preparedFlag_, [this](){
if (!url_.Valid()) {
ERROR_LOG(LOADER, "HTTP request failed, invalid URL");
latestError_ = "Invalid URL";
return;
}
if (!client_.Resolve(url_.Host().c_str(), url_.Port())) {
ERROR_LOG(LOADER, "HTTP request failed, unable to resolve: %s port %d", url_.Host().c_str(), url_.Port());
latestError_ = "Could not connect (name not resolved)";