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