| 170 | } |
| 171 | |
| 172 | std::string StringConverter::getRequestedFile(const std::string &msg) { |
| 173 | const std::string method = StringConverter::getMethod(msg); |
| 174 | if (!method.empty()) { |
| 175 | const std::string param = StringConverter::getHeaderFieldParameter(msg, method); |
| 176 | const std::string::size_type begin = param.find_first_of("/"); |
| 177 | const std::string::size_type end = param.find_first_of(" ", begin); |
| 178 | return param.substr(begin, end - begin); |
| 179 | } |
| 180 | return ""; |
| 181 | } |
| 182 | |
| 183 | std::string StringConverter::getMethod(const std::string &msg) { |
| 184 | // request line should be in the first line (method) |
nothing calls this directly
no outgoing calls
no test coverage detected