| 151 | } |
| 152 | |
| 153 | std::string extractPath(const std::string& request) |
| 154 | { |
| 155 | size_t sp = request.find(" "); |
| 156 | if (sp != std::string::npos) { |
| 157 | size_t pathStart = sp + 1; |
| 158 | size_t pathEnd = request.find(" ", pathStart); |
| 159 | if (pathEnd != std::string::npos) { |
| 160 | return request.substr(pathStart, pathEnd - pathStart); |
| 161 | } |
| 162 | } |
| 163 | return ""; |
| 164 | } |
| 165 | |
| 166 | size_t parseContentLength(const std::string& headers) |
| 167 | { |
no test coverage detected