diff --git a/http/http_connection.hpp b/http/http_connection.hpp
index ae0477a..3720d9d 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -16,6 +16,7 @@
 #include <boost/beast/core/flat_static_buffer.hpp>
 #include <boost/beast/ssl/ssl_stream.hpp>
 #include <boost/beast/websocket.hpp>
+#include <boost/url/url_view.hpp>
 #include <json_html_serializer.hpp>
 #include <security_headers.hpp>
 #include <ssl_key_handler.hpp>
@@ -336,15 +337,18 @@
                         << "." << thisReq.version() % 10 << ' '
                         << thisReq.methodString() << " " << thisReq.target()
                         << " " << thisReq.ipAddress;
-        try
+
+        boost::urls::error_code ec;
+        req->urlView = boost::urls::parse_relative_ref(
+            boost::urls::string_view(req->target().data(),
+                                     req->target().size()),
+            ec);
+        if (ec)
         {
-            thisReq.urlView = boost::urls::url_view(thisReq.target());
-            thisReq.url = thisReq.urlView.encoded_path();
+            return;
         }
-        catch (std::exception& p)
-        {
-            BMCWEB_LOG_ERROR << p.what();
-        }
+        req->url = std::string_view(req->urlView.encoded_path().data(),
+                                    req->urlView.encoded_path().size());
 
         res.setCompleteRequestHandler(nullptr);
         res.isAliveHelper = [this]() -> bool { return isAlive(); };
@@ -547,16 +551,21 @@
 
                 boost::beast::http::verb method = parser->get().method();
                 readClientIp();
-                try
+                boost::urls::error_code uriEc;
+                boost::urls::string_view uriStringView(
+                    parser->get().target().data(),
+                    parser->get().target().size());
+                BMCWEB_LOG_DEBUG << "Parsing URI: " << uriStringView;
+                req->urlView =
+                    boost::urls::parse_relative_ref(uriStringView, uriEc);
+                if (uriEc)
                 {
-                    req->urlView =
-                        boost::urls::url_view(parser->get().target());
-                    req->url = req->urlView.encoded_path();
+                    BMCWEB_LOG_ERROR << "Failed to parse URI "
+                                     << uriEc.message();
+                    return;
                 }
-                catch (std::exception& p)
-                {
-                    BMCWEB_LOG_ERROR << p.what();
-                }
+                req->url = std::string_view(req->urlView.encoded_path().data(),
+                                            req->urlView.encoded_path().size());
 
                 boost::asio::ip::address ip;
                 if (getClientIp(ip))
@@ -573,7 +582,7 @@
                     startDeadline(loggedInAttempts);
                     BMCWEB_LOG_DEBUG << "Starting slow deadline";
 
-                    req->urlParams = req->urlView.params();
+                    req->urlParams = req->urlView.query_params();
 
 #ifdef BMCWEB_ENABLE_DEBUG
                     std::string paramList = "";
diff --git a/http/http_request.hpp b/http/http_request.hpp
index fecb9de..da3d4e0 100644
--- a/http/http_request.hpp
+++ b/http/http_request.hpp
@@ -22,7 +22,7 @@
     boost::beast::http::fields& fields;
     std::string_view url{};
     boost::urls::url_view urlView{};
-    boost::urls::url_view::params_type urlParams{};
+    boost::urls::query_params_view urlParams{};
     bool isSecure{false};
 
     const std::string& body;
diff --git a/meson.build b/meson.build
index 2bbc0d9..650a5ec 100644
--- a/meson.build
+++ b/meson.build
@@ -151,6 +151,7 @@
     '-Wswitch-enum',
     '-Wnull-dereference',
     '-Wdouble-promotion',
+    '-Wno-newline-eof',
     '-Wformat=2',
   ]),
   language:'cpp')
@@ -363,7 +364,8 @@
 srcfiles_bmcweb = [
   'src/webserver_main.cpp',
   'redfish-core/src/error_messages.cpp',
-  'redfish-core/src/utils/json_utils.cpp'
+  'redfish-core/src/utils/json_utils.cpp',
+  'src/boost_url.cpp'
 ]
 
 srcfiles_unittest = [
@@ -433,7 +435,9 @@
 if(get_option('tests').enabled())
   foreach src_test : srcfiles_unittest
     testname = src_test.split('/')[-1].split('.')[0]
-    test(testname,executable(testname,src_test,
+    test(testname,executable(testname, 
+        [src_test,
+        'src/boost_url.cpp'],
                 include_directories : incdir,
                 install_dir: bindir,
                 dependencies: [
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 12ec64a..2c9ae3a 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -188,8 +188,7 @@
 static bool getSkipParam(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                          const crow::Request& req, uint64_t& skip)
 {
-    boost::urls::url_view::params_type::iterator it =
-        req.urlParams.find("$skip");
+    boost::urls::query_params_view::iterator it = req.urlParams.find("$skip");
     if (it != req.urlParams.end())
     {
         std::string skipParam = it->value();
@@ -210,8 +209,7 @@
 static bool getTopParam(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                         const crow::Request& req, uint64_t& top)
 {
-    boost::urls::url_view::params_type::iterator it =
-        req.urlParams.find("$top");
+    boost::urls::query_params_view::iterator it = req.urlParams.find("$top");
     if (it != req.urlParams.end())
     {
         std::string topParam = it->value();
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index 6e69f20..7383477 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -33,22 +33,23 @@
  */
 inline std::string getTransferProtocolTypeFromUri(const std::string& imageUri)
 {
-    try
+    boost::urls::error_code ec;
+    boost::urls::url_view url =
+        boost::urls::parse_uri(boost::string_view(imageUri), ec);
+    if (ec)
     {
-        std::string_view scheme = boost::urls::url_view(imageUri).scheme();
-        if (scheme == "smb")
-        {
-            return "CIFS";
-        }
-        if (scheme == "https")
-        {
-            return "HTTPS";
-        }
+        return "None";
     }
-    catch (std::exception& p)
+    boost::string_view scheme = url.scheme();
+    if (scheme == "smb")
     {
-        BMCWEB_LOG_ERROR << p.what();
+        return "CIFS";
     }
+    if (scheme == "https")
+    {
+        return "HTTPS";
+    }
+
     return "None";
 }
 
@@ -325,25 +326,26 @@
 inline std::optional<TransferProtocol>
     getTransferProtocolFromUri(const std::string& imageUri)
 {
-    try
+    boost::urls::error_code ec;
+    boost::urls::url_view url =
+        boost::urls::parse_uri(boost::string_view(imageUri), ec);
+    if (ec)
     {
-        std::string_view scheme = boost::urls::url_view(imageUri).scheme();
-        if (scheme == "smb")
-        {
-            return TransferProtocol::smb;
-        }
-        if (scheme == "https")
-        {
-            return TransferProtocol::https;
-        }
-        if (!scheme.empty())
-        {
-            return TransferProtocol::invalid;
-        }
+        return {};
     }
-    catch (std::exception& p)
+
+    boost::string_view scheme = url.scheme();
+    if (scheme == "smb")
     {
-        BMCWEB_LOG_ERROR << p.what();
+        return TransferProtocol::smb;
+    }
+    if (scheme == "https")
+    {
+        return TransferProtocol::https;
+    }
+    if (!scheme.empty())
+    {
+        return TransferProtocol::invalid;
     }
 
     return {};
diff --git a/src/boost_url.cpp b/src/boost_url.cpp
new file mode 100644
index 0000000..ce55e9b
--- /dev/null
+++ b/src/boost_url.cpp
@@ -0,0 +1,2 @@
+
+#include <boost/url/src.hpp>
\ No newline at end of file
diff --git a/subprojects/boost-url.wrap b/subprojects/boost-url.wrap
index c41d2d1..3d00dcf 100644
--- a/subprojects/boost-url.wrap
+++ b/subprojects/boost-url.wrap
@@ -1,3 +1,3 @@
 [wrap-git]
-revision = a56ae0df6d3078319755fbaa67822b4fa7fd352b
+revision = 4f712ed69a04a344957d22efa5dc111b415b3aff
 url = https://github.com/CPPAlliance/url.git
\ No newline at end of file
