Remove urlEncode

All new uses should be using boost::urls::url now.  This was the last
usage.

Tested: Logged into webui, and observed the correct URL behavior.
In browser window /foobar
Forwarded to /?next=/foobar#/login

Which is correct.

Note, this is different behavior slightly than before.  It was found
that the URI precedence goes query string THEN fragment, rather than the
other way around that we had it.  This was flagged when moving over to
boost url structures.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ifb354537d71a43c531d7d380dd889cf646731e39
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
index cb0da26..11964e0 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -216,7 +216,7 @@
         }
         keepAlive = thisReq.keepAlive();
 #ifndef BMCWEB_INSECURE_DISABLE_AUTHX
-        if (!crow::authentication::isOnAllowlist(req->url().buffer(),
+        if (!crow::authentication::isOnAllowlist(req->url().path(),
                                                  req->method()) &&
             thisReq.session == nullptr)
         {
diff --git a/include/forward_unauthorized.hpp b/include/forward_unauthorized.hpp
index 4ec770f..9ba2b1c 100644
--- a/include/forward_unauthorized.hpp
+++ b/include/forward_unauthorized.hpp
@@ -3,6 +3,9 @@
 #include "http_response.hpp"
 #include "http_utility.hpp"
 
+#include <boost/url/format.hpp>
+#include <boost/url/url.hpp>
+
 namespace forward_unauthorized
 {
 
@@ -21,9 +24,11 @@
         // If we have a webui installed, redirect to that login page
         if (hasWebuiRoute)
         {
+            boost::urls::url forward = boost::urls::format("/?next={}#/login",
+                                                           url);
             res.result(boost::beast::http::status::temporary_redirect);
             res.addHeader(boost::beast::http::field::location,
-                          "/#/login?next=" + http_helpers::urlEncode(url));
+                          forward.buffer());
             return;
         }
         // If we don't have a webui installed, just return an unauthorized
diff --git a/include/http_utility.hpp b/include/http_utility.hpp
index d18ac4b..eb54d0b 100644
--- a/include/http_utility.hpp
+++ b/include/http_utility.hpp
@@ -111,28 +111,4 @@
     return type == allowed;
 }
 
-inline std::string urlEncode(std::string_view value)
-{
-    std::ostringstream escaped;
-    escaped.fill('0');
-    escaped << std::hex;
-
-    for (const char c : value)
-    {
-        // Keep alphanumeric and other accepted characters intact
-        if ((isalnum(c) != 0) || c == '-' || c == '_' || c == '.' || c == '~')
-        {
-            escaped << c;
-            continue;
-        }
-
-        // Any other characters are percent-encoded
-        escaped << std::uppercase;
-        escaped << '%' << std::setw(2)
-                << static_cast<int>(static_cast<unsigned char>(c));
-        escaped << std::nouppercase;
-    }
-
-    return escaped.str();
-}
 } // namespace http_helpers
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index be26f65..b0c711b 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -854,8 +854,12 @@
             nlohmann::json retMessage = messages::success();
             taskData->messages.emplace_back(retMessage);
 
-            std::string headerLoc = "Location: " + dumpEntryPath +
-                                    http_helpers::urlEncode(dumpId);
+            boost::urls::url url = boost::urls::format(
+                "/redfish/v1/Managers/bmc/LogServices/Dump/Entries/{}", dumpId);
+
+            std::string headerLoc = "Location: ";
+            headerLoc += url.buffer();
+
             taskData->payload->httpHeaders.emplace_back(std::move(headerLoc));
 
             BMCWEB_LOG_DEBUG << createdObjPath.str