From 05c5fe35e3fb903525845131ba57d161110f3519 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andreas=20D=C3=BCring?= Date: Sun, 15 Apr 2018 13:57:59 +0200 Subject: [PATCH] Fix - allow port be specified in URL --- src/WikimediaApi.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/WikimediaApi.cpp b/src/WikimediaApi.cpp index 59264bd..ee67ae4 100644 --- a/src/WikimediaApi.cpp +++ b/src/WikimediaApi.cpp @@ -157,6 +157,12 @@ namespace WikiWalker apiBaseUrl = parsedUrl.m_Scheme; apiBaseUrl.append("://"); apiBaseUrl.append(parsedUrl.m_Host); + + if(!parsedUrl.m_Port.empty()) { + apiBaseUrl.append(":"); + apiBaseUrl.append(parsedUrl.m_Port); + } + apiBaseUrl.append("/w/api.php"); urlInfo.articleTitle = std::move(title); -- 2.11.4.GIT