From ebf4d62dd7d119b79cbd3c64570949dbdf9cdde9 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 10 Aug 2011 22:18:46 +0300 Subject: [PATCH] Fix URL regex --- source/http/utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/http/utils.cpp b/source/http/utils.cpp index 5a5dc04..870b86f 100644 --- a/source/http/utils.cpp +++ b/source/http/utils.cpp @@ -79,7 +79,7 @@ string urldecode(const string &str) Url parse_url(const string &str) { - static Regex r_url("(([a-z]+)://)?([a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*(:[0-9])?)?(/[^?#]*)?(\\?([^#]+))?(#(.*))?"); + static Regex r_url("^(([a-z]+)://)?([a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*(:[0-9]+)?)?(/[^?#]*)?(\\?([^#]+))?(#(.*))?$"); if(RegMatch m = r_url.match(str)) { Url url; -- 2.43.0