From 593b291e85b008aa6b7268da211fb54c841373b6 Mon Sep 17 00:00:00 2001
From: Thulinma <jaron@vietors.com>
Date: Tue, 4 Dec 2018 12:07:11 +0100
Subject: [PATCH] Fixed HTTP forwarding of wildcard streams

---
 lib/http_parser.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/http_parser.cpp b/lib/http_parser.cpp
index 7299e90c..f7eee456 100644
--- a/lib/http_parser.cpp
+++ b/lib/http_parser.cpp
@@ -400,9 +400,9 @@ std::string &HTTP::Parser::BuildRequest(){
   std::map<std::string, std::string>::iterator it;
   if (protocol.size() < 5 || protocol[4] != '/'){protocol = "HTTP/1.0";}
   if (method == "GET" && vars.size() && url.find('?') == std::string::npos){
-    builder = method + " " + url + allVars() + " " + protocol + "\r\n";
+    builder = method + " " + Encodings::URL::encode(url, "/:=@[]") + allVars() + " " + protocol + "\r\n";
   }else{
-    builder = method + " " + url + " " + protocol + "\r\n";
+    builder = method + " " + Encodings::URL::encode(url, "/:=@[]") + " " + protocol + "\r\n";
   }
   for (it = headers.begin(); it != headers.end(); it++){
     if ((*it).first != "" && (*it).second != ""){