diff options
author | madmaxoft <github@xoft.cz> | 2013-10-05 23:08:16 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-10-05 23:08:16 +0200 |
commit | b5c90d7b20fede4e643e96417684c7c009d063cb (patch) | |
tree | 16729dacd792717ae4818dbe019b0fd02c58048a /source/HTTPServer/HTTPMessage.cpp | |
parent | Fixed Base64Decode() returning wrong value. (diff) | |
download | cuberite-b5c90d7b20fede4e643e96417684c7c009d063cb.tar cuberite-b5c90d7b20fede4e643e96417684c7c009d063cb.tar.gz cuberite-b5c90d7b20fede4e643e96417684c7c009d063cb.tar.bz2 cuberite-b5c90d7b20fede4e643e96417684c7c009d063cb.tar.lz cuberite-b5c90d7b20fede4e643e96417684c7c009d063cb.tar.xz cuberite-b5c90d7b20fede4e643e96417684c7c009d063cb.tar.zst cuberite-b5c90d7b20fede4e643e96417684c7c009d063cb.zip |
Diffstat (limited to '')
-rw-r--r-- | source/HTTPServer/HTTPMessage.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/HTTPServer/HTTPMessage.cpp b/source/HTTPServer/HTTPMessage.cpp index 6cf9464a3..ab23866e6 100644 --- a/source/HTTPServer/HTTPMessage.cpp +++ b/source/HTTPServer/HTTPMessage.cpp @@ -120,6 +120,23 @@ int cHTTPRequest::ParseHeaders(const char * a_Data, int a_Size) +AString cHTTPRequest::GetBareURL(void) const +{ + size_t idxQM = m_URL.find('?'); + if (idxQM != AString::npos) + { + return m_URL.substr(0, idxQM); + } + else + { + return m_URL; + } +} + + + + + int cHTTPRequest::ParseRequestLine(const char * a_Data, int a_Size) { m_IncomingHeaderData.append(a_Data, a_Size); |