X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fio%2FHTTPRequest.cxx;h=0e789e5ce3920c9ddbed5ac48afa82b75689981b;hb=201cb61f842ef50a19438e3872ba22e588fa1afc;hp=38651a3e9062090c9f22e2f90c2558e5a6099e83;hpb=110753e92c4d512432b93d8789348a54341dec98;p=simgear.git diff --git a/simgear/io/HTTPRequest.cxx b/simgear/io/HTTPRequest.cxx index 38651a3e..0e789e5c 100644 --- a/simgear/io/HTTPRequest.cxx +++ b/simgear/io/HTTPRequest.cxx @@ -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()); @@ -204,6 +218,22 @@ bool Request::closeAfterComplete() const // for non HTTP/1.1 connections, assume server closes return _willClose || (_responseVersion != HTTP_1_1); } + +int Request::requestBodyLength() const +{ + return -1; +} + +std::string Request::requestBodyType() const +{ + return "text/plain"; +} + +void Request::getBodyData(char*, int& count) const +{ + count = 0; + return; +} } // of namespace HTTP