summaryrefslogtreecommitdiff
path: root/http
diff options
context:
space:
mode:
authorRavi Teja <raviteja28031990@gmail.com>2023-07-25 16:19:27 +0300
committerRavi Teja <raviteja28031990@gmail.com>2023-07-25 16:51:57 +0300
commitc1ef2a175392d5914f97d171eda7aa2883875dd5 (patch)
tree75600ced019088b8c1e68414671d97fd4441b84c /http
parent47af83218a7f64b451b7e7bccc82ecdb75e68a0a (diff)
downloadbmcweb-c1ef2a175392d5914f97d171eda7aa2883875dd5.tar.xz
Fix events destination url parsing for IPv6
Currently while parsing destination URL, host address enclosed in [] braces for IPv6 addresses, so Resolve hostname fails for IPv6 addresses because of this invalid hostname which is enclosed in [] braces. This commit uses encoded_host_address() method to fix this parsing hostname for IPv6 address. Tested By: Configured redfish event subscription with IPv6 destination URI verified parsing logic of destination URI with IPv6 addresses. Change-Id: I0e43468086ae0b961eb724de30e211d61ccda2d8 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
Diffstat (limited to 'http')
-rw-r--r--http/utility.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/http/utility.hpp b/http/utility.hpp
index b35811a9c7..572caec710 100644
--- a/http/utility.hpp
+++ b/http/utility.hpp
@@ -510,7 +510,7 @@ inline bool validateAndSplitUrl(std::string_view destUrl, std::string& urlProto,
port = setPortDefaults(url.value());
- host = url->encoded_host();
+ host = url->encoded_host_address();
path = url->encoded_path();
if (path.empty())