face: Allow trailing slash for UDP and TCP FaceUri's
Change-Id: I472bfdaf1e032f70dbba24a0d5a3117f198a526d
Refs: #1944
diff --git a/daemon/face/tcp-factory.cpp b/daemon/face/tcp-factory.cpp
index 30a2309..792068b 100644
--- a/daemon/face/tcp-factory.cpp
+++ b/daemon/face/tcp-factory.cpp
@@ -151,7 +151,7 @@
else if (uri.getScheme() == "tcp6")
addressSelector = resolver::Ipv6Address();
- if (!uri.getPath().empty())
+ if (!uri.getPath().empty() && uri.getPath() != "/")
{
onConnectFailed("Invalid URI");
}
diff --git a/daemon/face/udp-factory.cpp b/daemon/face/udp-factory.cpp
index 1a4ca01..d6954af 100644
--- a/daemon/face/udp-factory.cpp
+++ b/daemon/face/udp-factory.cpp
@@ -291,7 +291,7 @@
else if (uri.getScheme() == "udp6")
addressSelector = resolver::Ipv6Address();
- if (!uri.getPath().empty())
+ if (!uri.getPath().empty() && uri.getPath() != "/")
{
onConnectFailed("Invalid URI");
}