You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/07/01 12:06:30 UTC

[GitHub] [nifi-minifi-cpp] szaszm commented on a diff in pull request #1362: MINIFICPP-1830 Verify regex properties in processors in case it is set to empty

szaszm commented on code in PR #1362:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1362#discussion_r911902756


##########
libminifi/include/utils/HTTPUtils.h:
##########
@@ -31,14 +31,14 @@ so we convert localhost to our local hostname.
 inline bool parse_http_components(const std::string &url, std::string &port, std::string &scheme, std::string &path) {
 #ifdef WIN32
   auto hostname = (url.find(org::apache::nifi::minifi::io::Socket::getMyHostName()) != std::string::npos ? org::apache::nifi::minifi::io::Socket::getMyHostName() : "localhost");
-  std::string regex_str = "^(http|https)://(" + hostname + ":)([0-9]+)?(/.*)$";
+  std::string regex_str = "(http|https)://(" + hostname + ":)([0-9]+)?(/.*)$";
 #else
-  std::string regex_str = "^(http|https)://(localhost:)([0-9]+)?(/.*)$";
+  std::string regex_str = "(http|https)://(localhost:)([0-9]+)?(/.*)$";

Review Comment:
   Please remove the trailing `$` sign / end of line match as well. It should no longer be necessary, just like `^`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org