| 3712 | } |
| 3713 | |
| 3714 | inline bool parse_multipart_boundary(const std::string &content_type, |
| 3715 | std::string &boundary) { |
| 3716 | auto pos = content_type.find("boundary="); |
| 3717 | if (pos == std::string::npos) { return false; } |
| 3718 | boundary = content_type.substr(pos + 9); |
| 3719 | if (boundary.length() >= 2 && boundary.front() == '"' && |
| 3720 | boundary.back() == '"') { |
| 3721 | boundary = boundary.substr(1, boundary.size() - 2); |
| 3722 | } |
| 3723 | return !boundary.empty(); |
| 3724 | } |
| 3725 | |
| 3726 | #ifdef CPPHTTPLIB_NO_EXCEPTIONS |
| 3727 | inline bool parse_range_header(const std::string &s, Ranges &ranges) { |
no test coverage detected