diff options
Diffstat (limited to 'src/HttpRequest.cpp')
-rw-r--r-- | src/HttpRequest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/HttpRequest.cpp b/src/HttpRequest.cpp index 351c971..27a5ce5 100644 --- a/src/HttpRequest.cpp +++ b/src/HttpRequest.cpp @@ -10,6 +10,11 @@ HttpRequest::HttpRequest(const std::string& request_string) while ((pos = s.find("\r\n")) != std::string::npos) { line = s.substr(0, pos); + if (line.find("GET ") != std::string::npos) { + m_uri = s.substr(4, line.find(" ", 5) - 4); + std::cout << m_uri << std::endl; + } + // If the line contains a colon, we assume it's a header. // TODO: This may not always be the case. size_t delim_pos = 0; |