]> git.tdb.fi Git - libs/net.git/blobdiff - source/http/utils.cpp
Allow the query part of a URL to be empty
[libs/net.git] / source / http / utils.cpp
index 41fabeff80cb83c83e1ffd430b328073a27e1eb0..e52309aae50aab02648a1f1278d6787027063e74 100644 (file)
@@ -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;