Next round of boost-uri updates

Boost url has changed some APIs again.  This commit updates our URIs to
handle it.  As part of this work, it also removes some of the debug
prints that were put in early on.  These aren't really needed these
days.

This commit invents a temporary #define of NEW_BOOST_URL, so we can get
through the subtree update without a hard dependency on this specific
version of bmcweb.  Ideally boost-url would have some version field, but
unfortunately, it is thusfar unversioned, as the long term intent of the
author is to be included in boost, and would be versioned there.

All the code within the else of the NEW_BOOST_URL flag will be removed
once the subtree update is landed.

Tested:
Added CXXFLAGS:append = " -DNEW_BOOST_URL" to the recipe and checked out
on top of the subtree update, and build succeeded.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie2064e45efbc4331bdc5a5ddf44d877cde5e13cb
diff --git a/http/http_request.hpp b/http/http_request.hpp
index be1c2a2..32223c3 100644
--- a/http/http_request.hpp
+++ b/http/http_request.hpp
@@ -23,7 +23,9 @@
     boost::beast::http::fields& fields;
     std::string_view url{};
     boost::urls::url_view urlView{};
+#ifndef NEW_BOOST_URL
     boost::urls::query_params_view urlParams{};
+#endif
     bool isSecure{false};
 
     const std::string& body;
@@ -98,6 +100,22 @@
     }
 
   private:
+#ifdef NEW_BOOST_URL
+    bool setUrlInfo()
+    {
+        auto result = boost::urls::parse_relative_ref(
+            boost::urls::string_view(target().data(), target().size()));
+
+        if (!result)
+        {
+            return false;
+        }
+        urlView = *result;
+        url = std::string_view(urlView.encoded_path().data(),
+                               urlView.encoded_path().size());
+        return true;
+    }
+#else
     bool setUrlInfo()
     {
         boost::urls::error_code ec;
@@ -112,6 +130,7 @@
         urlParams = urlView.query_params();
         return true;
     }
+#endif
 };
 
 } // namespace crow