Catch more errors in url_view
Url_view can throw more exceptions.
Tested:
I wish I knew of a good way to test this, but because it relies on
breaking the protocol, it's difficult to use existing things to test.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: Iccaf864221cd1389574106316d3049283b44d08c
diff --git a/http/http_connection.h b/http/http_connection.h
index b5ad471..679140c 100644
--- a/http/http_connection.h
+++ b/http/http_connection.h
@@ -547,10 +547,11 @@
req->urlView = boost::urls::url_view(req->target());
req->url = req->urlView.encoded_path();
}
- catch (boost::urls::parse_error* p)
+ catch (std::exception& p)
{
BMCWEB_LOG_ERROR << p;
}
+
crow::authorization::authenticate(*req, res, session);
bool loggedIn = req && req->session;