| 76 | std::mutex handlersMutex; |
| 77 | |
| 78 | std::string extractPath(const std::string& request) |
| 79 | { |
| 80 | size_t sp = request.find(" "); |
| 81 | if (sp != std::string::npos) { |
| 82 | size_t pathStart = sp + 1; |
| 83 | size_t pathEnd = request.find(" ", pathStart); |
| 84 | if (pathEnd != std::string::npos) { |
| 85 | return request.substr(pathStart, pathEnd - pathStart); |
| 86 | } |
| 87 | } |
| 88 | return ""; |
| 89 | } |
| 90 | |
| 91 | static size_t parseContentLength(const std::string& headers) |
| 92 | { |
no test coverage detected