| 54 | } |
| 55 | |
| 56 | std::string strip_trailing_newline(std::string value) { |
| 57 | if (value.size() >= 2 && value.compare(value.size() - 2, 2, "\r\n") == 0) { |
| 58 | value.resize(value.size() - 2); |
| 59 | } else if (!value.empty() && value.back() == '\n') { |
| 60 | value.resize(value.size() - 1); |
| 61 | } |
| 62 | return value; |
| 63 | } |
| 64 | |
| 65 | MultipartPart parse_part(const std::string & segment) { |
| 66 | MultipartPart part; |
no test coverage detected