From bd1b1be37e7792afa05b28f5063443a6af3ec438 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 13 Dec 2017 16:37:34 +0100 Subject: [PATCH] Downloader class now properly URLencodes paths --- lib/downloader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/downloader.cpp b/lib/downloader.cpp index 6f76736d..b682f3ff 100644 --- a/lib/downloader.cpp +++ b/lib/downloader.cpp @@ -1,6 +1,7 @@ #include "downloader.h" #include "defines.h" #include "timing.h" +#include "encode.h" namespace HTTP{ @@ -103,7 +104,7 @@ namespace HTTP{ H.SetHeader("Host", proxyUrl.host); } }else{ - H.url = "/" + link.path; + H.url = "/" + Encodings::URL::encode(link.path); if (link.args.size()){H.url += "?" + link.args;} if (link.port.size()){ H.SetHeader("Host", link.host + ":" + link.port);