]> git.tdb.fi Git - libs/net.git/blobdiff - source/http/request.cpp
Use the append function from string utilities
[libs/net.git] / source / http / request.cpp
index 437b8ba6aff4ab476d3388192d3db7aa78fbdfab..685de332371749d35b7665e7619e399c39726f29 100644 (file)
@@ -53,11 +53,7 @@ Request Request::from_url(const string &str)
        string path = urlencode(url.path);
        if(path.empty())
                path = "/";
-       if(!url.query.empty())
-       {
-               path += '?';
-               path += url.query;
-       }
+       append(path, "?", url.query);
 
        Request result("GET", path);
        result.set_header("Host", url.host);