Merge commit 'refs/merge-requests/22' of git://gitorious.org/fg/simgear into merge-requests/22

This commit is contained in:
James Turner
2012-04-23 12:21:50 +01:00
parent 4abcf3215f
commit 69ef461e6d
4 changed files with 174 additions and 14 deletions
+14
View File
@@ -125,6 +125,20 @@ string Request::path() const
return u.substr(hostEnd, query - hostEnd);
}
string Request::query() const
{
string u(url());
int query = u.find('?');
if (query < 0) {
return ""; //no query string found
}
return u.substr(query); //includes question mark
}
string Request::host() const
{
string hp(hostAndPort());