Switch to unified view

a/libupnpp/upnpplib.cxx b/libupnpp/upnpplib.cxx
...
...
271
        if (s2[0] != '/')
271
        if (s2[0] != '/')
272
            out.push_back('/');
272
            out.push_back('/');
273
    }
273
    }
274
    out += s2;
274
    out += s2;
275
    return out;
275
    return out;
276
}
277
278
string baseurl(const string& url)
279
{
280
    string::size_type pos = url.find("://");
281
    if (pos == string::npos)
282
        return url;
283
284
    pos = url.find_first_of("/", pos + 3);
285
    if (pos == string::npos) {
286
        return url;
287
    } else {
288
        return url.substr(0, pos + 1);
289
    }
276
}
290
}
277
291
278
static void path_catslash(string &s) {
292
static void path_catslash(string &s) {
279
    if (s.empty() || s[s.length() - 1] != '/')
293
    if (s.empty() || s[s.length() - 1] != '/')
280
        s += '/';
294
        s += '/';